Repository navigation
Commit 352a504
committed
refactor(server): simplify isGitRepository per review
Apply review suggestion: collapse the parent-walk into a single while
loop using the dirname-equals-self termination check, and drop the
redundant parse(cwd).root guard. Behavior is unchanged for every cwd the
codebase actually passes in (always a sub-path of the repo).1 parent aee131d commit 352a504
1 file changed
Lines changed: 6 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
28 | 16 | | |
| 17 | + | |
29 | 18 | | |
30 | 19 | | |
31 | 20 | | |
| |||
0 commit comments