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

Re: issue: strange `git diff --numstat` behavior.

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 13, 2018, 08:13 UTC
Message-ID
<xmqqr2gu8dsx.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAD1gVxMg0ZiKqFABrnwt0v_=wr2X_3ErkR92RmCAtFQnuM+L5w@mail.gmail.com>
Sergey Andreenko <andreenkosa@gmail.com> writes:
Show 10 quoted lines
> git.exe diff --numstat "C:\diff" "C:\base"
> ...
> output will be:
>
>               0       1       {iff => ase}/1.txt
>
> So (folder_name_length) symbols were cut from the path (“C:\\d” and “C:\\b”).
>
> Is any way to avoid that? I have checked several git versions and they
> all do the same.

Not an attempt to offer a solution (I don't do windows), but just trying to see what random things we can try, I wonder what you'd get if you did something like

	$ git diff --numstat //c/diff //c/base
Previous: Sergey AndreenkoNext: Johannes Sixt
Message 2 of 8 in “issue: strange `git diff --numstat` behavior.”
  1. Sergey AndreenkoOct 12, 2018
  2. Junio C HamanoOct 13, 2018
  3. diff: don't attempt to strip prefix from absolute Windows pathsJohannes Sixt, Oct 18, 2018
  4. Stefan BellerOct 18, 2018
  5. Johannes SixtOct 18, 2018
  6. diff: don't attempt to strip prefix from absolute Windows pathsJohannes Sixt, Oct 19, 2018
  7. Stefan BellerOct 19, 2018
  8. Junio C HamanoOct 19, 2018

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.