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

Re: [PATCH V2/RFC][GSoC] diff-no-index: transform "$directory $file" args to "$directory/$file $file"

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 26, 2015, 22:58 UTC
Message-ID
<xmqq4mp7xt5k.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAHLaBN+nE9tmGMdJM65V-bONKe8CE9PZ1Ottc1R9D=Pm0X7k_g@mail.gmail.com>
Yurii Shevtsov <ungetch@gmail.com> writes:
Show 13 quoted lines
> git diff --no-index refuses to compare if args are directory and file,
> instead of usual diff.
>
> Now git diff --no-index modifies args, if they're directory and file,
> and diffs files, as usual diff does.
>
> Changes are done in diff_no_index().
>
> Helped-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: Yurii Shevtsov <ungetch@gmail.com>
> ---
>  diff-no-index.c |   31 +++++++++++++++++++++++++++++--
>  1 files changed, 29 insertions(+), 2 deletions(-)

This round looks sensible. Good catch to notice that POSIX wants you to append not just the "path to the file", but the basename of the file, to the directory name.

I didn't try your patch, but I wouldn't be surprised if it passed the tests in the patches I wrote last night in the $gmane/266315 thread ;-).

Good luck with your GSoC application.
Previous: Yurii Shevtsov
Message 2 of 2 in “[GSoC] diff-no-index: transform "$directory $file" args to "$directory/$file $file"”
  1. [GSoC] diff-no-index: transform "$directory $file" args to "$directory/$file $file"Yurii Shevtsov, Mar 26, 2015
  2. Junio C HamanoMar 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.