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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]