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

Re: [PATCH] log,diff-tree: add --combined-with-paths options for merges with renames

From
Elijah Newren <newren@gmail.com>
Date
Jan 25, 2019, 16:30 UTC
Message-ID
<CABPp-BE9qFHGmJ-qO4Bx+wmO8N7pO_hdros5Q2hxd32=zU0F5A@mail.gmail.com>
In-Reply-To
<e9dd9394-e34d-e948-9a9c-83338b672d65@gmail.com>
Hi,
On Fri, Jan 25, 2019 at 6:45 AM Derrick Stolee <stolee@gmail.com> wrote:
Show 19 quoted lines
>
> On 1/24/2019 11:46 AM, Elijah Newren wrote:
> > As an alternative, I considered perhaps trying to sell it as a bugfix
> > (how often do people use -M, -c, and --raw together and have renames
> > in merge commits -- can I just change the format to include the old
> > names), but was worried that since diff-tree is plumbing and that the
> > format was documented to not include original filename(s), that I'd be
> > breaking backward compatibility in an important way for someone and
> > thus opted for a new flag to get the behavior I needed.
>
> This is wise. Changing the format is likely to break at least one GUI
> client or tool, especially because many depend on the installed version
> of Git instead of shipping with one "blessed" client.
>
> In addition, there may be whitespace in the filenames. It appears the
> diff format separates the filenames with tab characters. Is it
> possible to have tab character in a file name? That would make the output
> ambiguous, but is no worse than our current output in a non-combined
> diff.

No, it's actually unambiguous with or without the -z option. Without -z, pathnames with "unusual" characters (whose definition depends on core.quotePath) will cause the pathname to be enclosed in double-quotes with the unusual characters handed with backslashes and control characters. With -z, it separates pathnames with a nul character instead.

> I'll repeat Brian's request for tests. I trust the compiler and the
> test suite more than I trust my ability to read code.
Yep, I'll add a pair and use filenames with multiple tabs.
Previous: Derrick StoleeNext: Elijah Newren
Message 5 of 39 in “log,diff-tree: add --combined-with-paths options for merges with renames”
  1. log,diff-tree: add --combined-with-paths options for merges with renamesElijah Newren, Jan 24, 2019
  2. brian m. carlsonJan 25, 2019
  3. Elijah NewrenJan 25, 2019
  4. Derrick StoleeJan 25, 2019
  5. Elijah NewrenJan 25, 2019
  6. log,diff-tree: add --combined-with-paths options for merges with renamesElijah Newren, Jan 25, 2019
  7. Derrick StoleeJan 25, 2019
  8. Elijah NewrenJan 25, 2019
  9. Eric SunshineJan 25, 2019
  10. Elijah NewrenJan 26, 2019
  11. brian m. carlsonJan 27, 2019
  12. log,diff-tree: add --combined-all-names optionElijah Newren, Jan 26, 2019
  13. log,diff-tree: add --combined-all-names optionElijah Newren, Feb 4, 2019
  14. Junio C HamanoFeb 4, 2019
  15. Elijah NewrenFeb 5, 2019
  16. Junio C HamanoFeb 5, 2019
  17. Elijah NewrenFeb 7, 2019
  18. Junio C HamanoFeb 7, 2019
  19. Elijah NewrenFeb 7, 2019
  20. Junio C HamanoFeb 7, 2019
  21. Elijah NewrenFeb 7, 2019
  22. Johannes SchindelinFeb 5, 2019
  23. Elijah NewrenFeb 5, 2019
  24. Junio C HamanoFeb 5, 2019
  25. Junio C HamanoFeb 7, 2019
  26. Elijah NewrenFeb 7, 2019
  27. 0/2 add --combined-all-paths option to log and diff-treeElijah Newren, Feb 8, 2019
  28. 2/2 squash! log,diff-tree: add --combined-all-paths optionElijah Newren, Feb 8, 2019
  29. Junio C HamanoFeb 8, 2019
  30. Elijah NewrenFeb 8, 2019
  31. 1/2 log,diff-tree: add --combined-all-paths optionElijah Newren, Feb 8, 2019
  32. Junio C HamanoFeb 8, 2019
  33. Elijah NewrenFeb 8, 2019
  34. Junio C HamanoFeb 8, 2019
  35. Junio C HamanoJan 25, 2019
  36. Elijah NewrenJan 25, 2019
  37. Junio C HamanoJan 25, 2019
  38. Elijah NewrenJan 26, 2019
  39. Junio C HamanoJan 28, 2019

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.