git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] diff-lib.c: handle empty deleted ita files

From
Varun Naik <vcnaik94@gmail.com>
Date
Feb 14, 2020, 17:12 UTC
Message-ID
<CAK_rgsEV9t3okUDrG5mHX3DkyZFCX7yGoJEsSeCGTK7zBHJPgA@mail.gmail.com>
In-Reply-To
<xmqqwof8x66a.fsf@gitster-ct.c.googlers.com>
On Mon, Aug 19, 2019 at 1:15 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
>
> I do agree that diff-lib.c::show_modified(), which is about "git
> diff-cache" (and hence "git diff <tree-ish>", i.e. comparison
> between a tree-ish and the index), is the right layer for this
> change.
>
> I am not offhand sure about the diff.c::diff_change(), though, and
> cannot say much without first thinking about it a bit more.
I'm back!

I made the changes to "struct diff_filespec" and diff_resolve_rename_copy() that I mentioned in my previous email on this thread, and it seems to work. But the patch seems very clunky. Even though it has been in the back of my mind for six months, I can't think of a more elegant approach. Furthermore, the few test cases that I could create are extremely unlikely in practice. For all of these reasons, I would rather avoid this patch altogether.

v2 is still sitting in pu. Could we discard it? I'll send an update to the related patch [0] in a few minutes.

[0]: https://public-inbox.org/git/20190821032100.73917-1-vcnaik94@gmail.com/

Best, Varun

Previous: Junio C Hamano
Message 11 of 11 in “reset: unstage empty deleted ita files”
  1. reset: unstage empty deleted ita filesVarun Naik, Jul 12, 2019
  2. reset: unstage empty deleted ita filesVarun Naik, Jul 26, 2019
  3. Junio C HamanoJul 26, 2019
  4. Varun NaikJul 29, 2019
  5. Junio C HamanoJul 29, 2019
  6. diff-lib.c: handle empty deleted ita filesVarun Naik, Aug 1, 2019
  7. Varun NaikAug 15, 2019
  8. Junio C HamanoAug 15, 2019
  9. Varun NaikAug 19, 2019
  10. Junio C HamanoAug 19, 2019
  11. Varun NaikFeb 14, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.