From: Junio C Hamano <gitster@pobox•com>
To: Elijah Newren <newren@gmail•com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail•com>,
git@vger•kernel.org
Subject: Re: [PATCH] diffcore-delta: avoid ignoring final 'line' of file
Date: Thu, 18 Jan 2024 22:27:43 -0800 [thread overview]
Message-ID: <xmqqbk9hn8gw.fsf@gitster.g> (raw)
In-Reply-To: <CABPp-BHybPEg_+649fL6QrKjRQcJXxbYMFiQn0KxAgbr2Nz0Gg@mail.gmail.com> (Elijah Newren's message of "Thu, 18 Jan 2024 21:05:47 -0800")
Elijah Newren <newren@gmail•com> 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.
next prev parent reply other threads:[~2024-01-19 6:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 20:47 [PATCH] diffcore-delta: avoid ignoring final 'line' of file Elijah Newren via GitGitGadget
2024-01-11 21:45 ` Taylor Blau
2024-01-11 23:00 ` Junio C Hamano
2024-01-13 1:45 ` Elijah Newren
2024-01-13 6:21 ` Junio C Hamano
2024-01-19 1:54 ` Elijah Newren
2024-01-19 3:06 ` Junio C Hamano
2024-01-19 5:05 ` Elijah Newren
2024-01-19 6:27 ` Junio C Hamano [this message]
2024-01-13 4:26 ` [PATCH v2] " Elijah Newren via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqbk9hn8gw.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitgitgadget@gmail$(echo .)com \
--cc=newren@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox