summaryrefslogtreecommitdiff
path: root/branch.h
diff options
context:
space:
mode:
authorLibravatar Denton Liu <liu.denton@gmail.com>2020-03-26 04:27:55 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-27 10:56:40 -0700
commitec8f87b8eb5304c7cffa8b76838ad96850cf0e55 (patch)
tree74872f856f1e54dc87f7767d35792f7078fc4308 /branch.h
parentt5612: stop losing return codes of git commands (diff)
downloadtgif-ec8f87b8eb5304c7cffa8b76838ad96850cf0e55.tar.xz
t5801: teach compare_refs() to accept !
Before, testing if two refs weren't equal with compare_refs() was done with `test_must_fail compare_refs`. This was wrong for two reasons. First, test_must_fail should only be used on git commands. Second, negating the error code is a little heavy-handed since in the case where one of the git invocations within compare_refs() fails, we will report success, even though it failed at an unexpected point. Teach compare_refs() to accept `!` as the first argument which would _only_ negate the test_cmp()'s return code. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'branch.h')
0 files changed, 0 insertions, 0 deletions