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

Re: git log --name-only improvement: show old file name in rename

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 11, 2020, 23:16 UTC
Message-ID
<xmqqsgf1i46l.fsf@gitster.c.googlers.com>
In-Reply-To
<BL0PR11MB3460BEB60550854661B5178B9D800@BL0PR11MB3460.namprd11.prod.outlook.com>
Ed Avis <ed.avis@qmaw.com> writes:
Show 8 quoted lines
> The git-log manual page says
>
>        --name-only
>            Show only names of changed files.
>
> But when a file has been renamed, only the new name is printed, not the 
> old.  I think it would be more useful and more correct to print both 
> names. 
It is just you who thinks it would be more useful.

Scripts written by people over the last 10 years that expect to see new name would certainly hate to see two names start appearing there.

Perhaps you can use --summary at the same time?
Previous: Ed AvisNext: Philip Oakley
Message 2 of 9 in “git log --name-only improvement: show old file name in rename”
  1. Ed AvisJun 11, 2020
  2. Junio C HamanoJun 11, 2020
  3. Philip OakleyJun 12, 2020
  4. Junio C HamanoJun 12, 2020
  5. Ed AvisJun 15, 2020
  6. Nathan FaulknerMay 16, 2024
  7. Re*: git log --name-only improvement: show old file name in renameJunio C Hamano, May 17, 2024
  8. Nathan FaulknerMay 18, 2024
  9. Junio C HamanoMay 18, 2024

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.