Commit 2f19caf
committed
util/gitutil: fix TestGitFullCommitErr/TestGitShortCommitErr
git rev-parse HEAD doesn't need any `--`, however, when it is called
on an empty repo git returns an error:
```
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
```
So, it is both IsUnknownRevision and IsAmbiguousArgument.
Lets simply fix the test by flipping the check: I don't see
any dependency on this behavior in non-test code.1 parent ba6eae3 commit 2f19caf
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments