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

Re: [PATCH/RFC][GSoC] make "git diff --no-index $directory $file" DWIM better.

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 16, 2015, 19:20 UTC
Message-ID
<xmqq3854rbpj.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAHLaBN+FZ5LLwU-6VnFoPva=omtPpCEPzmdvY_3H43dag8kqxg@mail.gmail.com>
Yurii Shevtsov <ungetch@gmail.com> writes:
Show 8 quoted lines
> Yes, I have red what you wrote several times and tried your example.
> I'm really sorry if I sound like I just ignored it. I just got a
> little bit lost about which procedure needs patching. You're
> absolutely right, queue_diff() is wrong place for it. So do you agree
> that "append the name of the file at the end of the directory" logic
> should be put to diff_no_index() which will also include calling
> get_mode() for each path[] member? Sorry again for asking so much
> questions
Questions are to be asked; no need to apologize.

I think that the "if asked to compare D and F, pretend as if asked to compare D/F and F" and friends (meaning, "if asked to compare F and D, compare F and D/F" needs to be handled the same way, and also it needs to handle the case where "D/F" does *not* exist) logic can be added to diff_no_index() just before it calls queue_diff().

"If one is directory but not the other, return an error" code may need to be fixed but I think that would be a larger change than a few hours work (which I understand is the size GSoC Micro aims for).

Previous: Yurii ShevtsovNext: t.gummerer@gmail.com
Message 7 of 13 in “[GSoC] make "git diff --no-index $directory $file" DWIM better.”
  1. [GSoC] make "git diff --no-index $directory $file" DWIM better.Yurii Shevtsov, Mar 15, 2015
  2. Matthieu MoyMar 15, 2015
  3. Junio C HamanoMar 16, 2015
  4. Yurii ShevtsovMar 16, 2015
  5. Junio C HamanoMar 16, 2015
  6. Yurii ShevtsovMar 16, 2015
  7. Junio C HamanoMar 16, 2015
  8. t.gummerer@gmail.comMar 15, 2015
  9. Eric SunshineMar 15, 2015
  10. Junio C HamanoMar 15, 2015
  11. t.gummerer@gmail.comMar 15, 2015
  12. Eric SunshineMar 15, 2015
  13. Junio C HamanoMar 15, 2015

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.