Thread (1 message) 1 message, 1 author, 2024-01-19

Re: [PATCH] diffcore-delta: avoid ignoring final 'line' of file

From: Junio C Hamano <hidden>
Date: 2024-01-19 06:27:46

Elijah Newren [off-list ref] writes:
But perhaps I can put it another way:  You can't just look at the
output of `diff --name-only` and say a rename was involved -- unless
you know the test setup and the previous operations.
That is true.  But that is exactly what a test is about.  You have
this and that file, and you do this operation, now what should
happen?  Does the observation match the expectation?  That is what
our tests are done.

And your argument should not have to rely on a bug in "git mv".
After all, you should be able to do the same with "mv A B && git add
B && git add -u" (or "git rm -f A") and you won't be affected by
such a bug.
If you still like `diff --name-only` better anyway, that's fine and
I'll switch it.  I'm just stating why it seems suboptimal to me.
I'd prefer to omit "sed" involved, but I'd even more prefer not
waste more time on the test.  As long as we can make a robust test
(which an extra process running sed would certainly give us), I'd be
fine.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help