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

Re: [PATCH v5] diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.

From
Keshav Kini <keshav.kini@gmail.com>
Date
Oct 15, 2013, 22:58 UTC
Message-ID
<87wqlexhth.fsf@gmail.com>
In-Reply-To
<xmqqbo2qb0wk.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 40 quoted lines
> Yoshioka Tsuneo <yoshiokatsuneo@gmail.com> writes:
>
>> "git diff -M --stat" can detect rename and show renamed file name like
>> "foofoofoo => barbarbar". But if destination filename is long, the line
>> is shortened like "...barbarbar" so there is no way to know whether the
>> file is renamed or existed in the source commit.
>
> Is "destination" filename more special than the source filename?
> Perhaps "s/if destination filename is/if filenames are/"?
>
> 	Note: I do not want you to reroll using the suggested
> 	wording without explanation; it may be possible that I am
> 	missing something obvious and do not understand why you
> 	singled out destination, in which case I'd rather see it
> 	explained better in the log message than the potentially
> 	suboptimal suggestion I made in the review without
> 	understanding the issue. Of course, it is possible that you
> 	want to do the same when source is overlong, in which case
> 	you can just say "Yeah, you're right; will reroll".
>
>         The above applies to all the other comments in this message.
>
> Also "s/source commit/original/".  You may not be comparing two
> commits after all.
>
>> Make sure there is always an arrow, like "...foo => ...bar".
>> The output can contains curly braces('{','}') for grouping.
>
> s/contains/contain/;
>
>> So, in general, the outpu format is "<pfx>{<mid_a> => <mid_b>}<sfx>"
>
> s/outpu/&t/;
>
>> To keep arrow("=>"), try to omit <pfx> as long as possible at first
>> because later part or changing part will be the more important part.
>> If it is not enough, shorten <mid_a>, <mid_b>, and <sfx> trying to
>> have the maximum length the same because those will be equaly important.
>
> A sound reasoning.
Also s/equaly/equally/;
-Keshav
Previous: Junio C HamanoNext: Yoshioka Tsuneo
Message 16 of 31 in “diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.”
  1. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.Yoshioka Tsuneo, Oct 11, 2013
  2. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.Yoshioka Tsuneo, Oct 11, 2013
  3. Sam VilainOct 11, 2013
  4. Keshav KiniOct 12, 2013
  5. Yoshioka TsuneoOct 12, 2013
  6. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.Yoshioka Tsuneo, Oct 12, 2013
  7. Thomas RastOct 13, 2013
  8. Yoshioka TsuneoOct 15, 2013
  9. Duy NguyenOct 14, 2013
  10. Yoshioka TsuneoOct 15, 2013
  11. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.Yoshioka Tsuneo, Oct 15, 2013
  12. Felipe ContrerasOct 15, 2013
  13. Yoshioka TsuneoOct 15, 2013
  14. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.Yoshioka Tsuneo, Oct 15, 2013
  15. Junio C HamanoOct 15, 2013
  16. Keshav KiniOct 15, 2013
  17. Yoshioka TsuneoOct 16, 2013
  18. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.Yoshioka Tsuneo, Oct 16, 2013
  19. Junio C HamanoOct 17, 2013
  20. Yoshioka TsuneoOct 17, 2013
  21. Junio C HamanoOct 17, 2013
  22. Yoshioka TsuneoOct 18, 2013
  23. Junio C HamanoOct 17, 2013
  24. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visibleYoshioka Tsuneo, Oct 17, 2013
  25. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visibleYoshioka Tsuneo, Oct 18, 2013
  26. Thomas RastOct 19, 2013
  27. Yoshioka TsuneoOct 20, 2013
  28. Junio C HamanoOct 22, 2013
  29. Yoshioka TsuneoOct 22, 2013
  30. Junio C HamanoOct 22, 2013
  31. diff.c: keep arrow(=>) on show_stats()'s shortened filename part to make rename visible.Yoshioka Tsuneo, Oct 12, 2013

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.