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

Re: [PATCH] combine-diff: use textconv for combined diff format

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 16, 2011, 21:37 UTC
Message-ID
<m31v11yj37.fsf@localhost.localdomain>
In-Reply-To
<7vei52azbf.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> But that opens an old can of worms we should have opened and closed four
> years ago.
> 
> The header shows "diff --cc a" followed by "--- a/a" followed by "+++ b/a"
> before the hunk for a two-way merge.  But if we are to "combine and
> condense", another possibility is to show:
> 
>     diff --cc a/a b/a c/a
>     index bf7c788,fa9d23a,5d24d9f..cc69134
>     --- a/a
>     --- b/a
>     +++ c/a
>     @@@@ -74,26 -74,6 -74,29 +74,50 @@@@
>     ...
> 
> to keep the paths information.  I do not think anybody cared so far, and
> perhaps we should have done it when we introduced -c/--cc, but it is not
> at all worth changing now.

Such feature would greatly simplify gitweb code for dealing with combined diff (for a merge commit). It wouldn't have to jump through hoops[1] to get pre-image names to have correct link to pre-image...

This affects gitweb performance... in those rare case where we have rename in merge commit (gitweb is smart enough to do this dance only if there is rename in a merge).

Note that tree-diff doesn't help either - we have only post-image name.

[1]: fill_from_file_info subroutine, which in turn uses
     git_get_path_by_hash once per parent, which uses git-ls-tree
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Junio C HamanoNext: Jeff King
Message 17 of 25 in “textconv not invoked when viewing merge commit”
  1. Peter OberndorferApr 11, 2011
  2. Michael J GruberApr 12, 2011
  3. Jeff KingApr 14, 2011
  4. Jeff KingApr 14, 2011
  5. Junio C HamanoApr 14, 2011
  6. Jeff KingApr 14, 2011
  7. Michael J GruberApr 14, 2011
  8. Junio C HamanoApr 14, 2011
  9. Junio C HamanoApr 14, 2011
  10. Jeff KingApr 14, 2011
  11. Junio C HamanoApr 14, 2011
  12. Jeff KingApr 14, 2011
  13. combine-diff: use textconv for combined diff formatMichael J Gruber, Apr 15, 2011
  14. Junio C HamanoApr 15, 2011
  15. Michael J GruberApr 16, 2011
  16. Junio C HamanoApr 16, 2011
  17. Jakub NarebskiApr 16, 2011
  18. Jeff KingApr 15, 2011
  19. Peter OberndorferApr 21, 2011
  20. Matthieu MoyApr 15, 2011
  21. Junio C HamanoApr 15, 2011
  22. Jeff KingApr 16, 2011
  23. Junio C HamanoApr 16, 2011
  24. Jeff KingApr 16, 2011
  25. Junio C HamanoApr 16, 2011

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.