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

Re: [RFC/PATCH] align D/F handling of "diff --no-index" with that of normal Git

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 22, 2015, 17:56 UTC
Message-ID
<CAPc5daWmgAg-_UKkKwi0KwX4_enYJU1SEK9oyReW84-TP_-R1A@mail.gmail.com>
In-Reply-To
<550EB77F.3040005@ramsay1.demon.co.uk>

On Sun, Mar 22, 2015 at 5:37 AM, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:

Show 14 quoted lines
> On 22/03/15 05:11, Junio C Hamano wrote:
>> +             if (S_ISDIR(mode1)) {
>> +                     /* 2 is file that is created */
>> +                     d1 = noindex_filespec(NULL, 0);
>> +                     d2 = noindex_filespec(name2, mode2);
>> +                     name2 = NULL;
>> +                     mode2 = 0;
>> +             } else {
>> +                     /* 1 is file that is deleted */
>> +                     d1 = noindex_filespec(name1, mode2);
>
> I have not been following the discussion (or even really
> studied this patch), but the asymmetry here caught my eye
> as I was skimming the email.

Yes, the assymetry is a stupid cut-and-paste error. Thanks for catching.

There was actually no discussion on this point other than a tangential mention of the problem to be solved, so you are up to date as long as you read the proposed log message in the message you are responding to ;-)

Another thing I noticed while I was playing with this is that when comparing D1 and D2, a path that was modified is shown as a patch between a/D1/path and b/D2/path, but a path that was created or removed shows D1 or D2 on both sides of the comparison, which we may also want to fix. This problem appears in the current codebase without the patch under discussion.

Previous: Ramsay JonesNext: Junio C Hamano
Message 4 of 7 in “align D/F handling of "diff --no-index" with that of normal Git”
  1. align D/F handling of "diff --no-index" with that of normal GitJunio C Hamano, Mar 22, 2015
  2. Eric SunshineMar 22, 2015
  3. Ramsay JonesMar 22, 2015
  4. Junio C HamanoMar 22, 2015
  5. 0/2 "diff --no-index" updatesJunio C Hamano, Mar 26, 2015
  6. 1/2 diff-no-index: DWIM "diff D F" into "diff D/F F"Junio C Hamano, Mar 26, 2015
  7. 2/2 diff: align D/F handling of "diff --no-index" with that of normal GitJunio C Hamano, Mar 26, 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.