Commit 1ed7037
authored
azrepos: fix error message to stderr when not in repo (#1583)
Suppress the standard error stream from Git when checking if we're
inside a repository or not, because the failure message is otherwise
printed to the user's console when we are not (which is what we're
trying to decide!).
Note that we normally don't suppress or redirect the standard error
stream for Git commands as the user may have enabled Git tracing (v1 or
v2) to the stderr file and we don't want to mute these for all calls.
Example before:
```shell
% pwd
/Users/mjcheetham
% gcm azure-repos list
fatal: not a git repository (or any of the parent directories): .git
devdiv:
(global) -> USER@DOMAIN
```
Example now:
```shell
% pwd
/Users/mjcheetham
% gcm azure-repos list
devdiv:
(global) -> USER@DOMAIN
```File tree
2 files changed
+24
-9
lines changed2 files changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
119 | 125 | | |
120 | 126 | | |
121 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
122 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
126 | 148 | | |
127 | 149 | | |
128 | 150 | | |
| |||
270 | 292 | | |
271 | 293 | | |
272 | 294 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | 295 | | |
283 | 296 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
0 commit comments