summaryrefslogtreecommitdiff
path: root/Documentation/git-show.txt
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2020-08-03 18:41:17 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-08-03 11:48:13 -0700
commitfe48efb5fd161babea245415ee4feef60fee4964 (patch)
tree06c578243c35d9cf7d3bbd5000096ba051c2b5ac /Documentation/git-show.txt
parentThird batch (diff)
downloadtgif-fe48efb5fd161babea245415ee4feef60fee4964.tar.xz
t6038: make tests fail for the right reason
t6038 had a pair of tests that were expected to fail, but weren't failing for the expected reason. Both were meant to do a merge that could be done cleanly after renormalization, but were supposed to fail for lack of renormalization. Unfortunately, both tests had staged changes, and checkout -m would abort due to the presence of those staged changes before even attempting a merge. Fix this first issue by utilizing git-restore instead of git-checkout, so that the index is left alone and just the working directory gets the changes we want. However, there is a second issue with these tests. Technically, they just wanted to verify that after renormalization, no conflicts would be present. This could have been checked for by grepping for a lack of conflict markers, but the test instead tried to compare the working directory files to an expected result. Unfortunately, the setting of "text=auto" without setting core.eol to any value meant that the content of the file (in particular, the line endings) would be platform-dependent and the tests could only pass on some platforms. Replace the existing comparison with a call to 'git diff --no-index --ignore-cr-at-eol' to verify that the contents, other than possible carriage returns in the file, match the expected results and in particular that the file has no conflicts from the checkout -m operation. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-show.txt')
0 files changed, 0 insertions, 0 deletions