Thread (10 messages) flat view 10 messages, 5 authors, 2016-06-15

Re: [PATCH] Re-re-re-fix common tail optimization

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:59

Jeff King [off-list ref] writes:
This would probably work better as 'cat'.
Yeah, I amended it without adding another "re-" to the title ;-)  The
result has been already pushed out.
quoted
+test_expect_success 'diff -U0' '
+
+	git diff -U0 | sed -e "/^index/d" -e "s/$z2047/Z/g" >actual &&
+	diff -u expect actual
Aren't we using "git diff" for the second diff there nowadays?
Some people seem to think that is a good idea, but I generally do not
like using "git diff" between expect and actual (both untracked) inside
tests.  The last "diff" is about validating what git does and using "git
diff" there would make the test meaningless when "git diff" itself is
broken.

This is especially so because comparison between untracked files is a
bolted-on afterthought and I am least confident about among the
codepaths in the whole "git diff" (it is not even my nor Linus's code).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help