Re: [PATCH (resend)] gitweb: Support comparing blobs (files) with different names

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH (resend)] gitweb: Support comparing blobs (files) with different names

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:02

Jakub Narebski [off-list ref] writes:
Fix the bug that caused "blobdiff" view called with new style URI
for a rename with change diff to be show as new (added) file diff.

New style URI for "blobdiff" for rename means with $hash_base ('hb') and
$hash_parent_base ('hpb') paramaters denoting tree-ish (usually commit)
of a blobs being compared, together with both $file_name ('f') and
$file_parent ('fp') parameters.

It is done by adding $file_parent ('fp') to the path limiter, meaning
that diff command becomes:

	git diff-tree [options] hpb hb -- fp f

Other option would be finding hash of a blob using git_get_hash_by_path
subroutine and comparing blobs using git-diff, or using extended SHA-1
syntax and compare blobs using git-diff:

	git diff [options] hpb:fp hp:f

Signed-off-by: Jakub Narebski <redacted>
---
Junio, could you apply this? It looks like it was lost in the noise.
I was waiting for dust to settle.  Ack's from people involved in
the discussion would be nice.

Re: [PATCH (resend)] gitweb: Support comparing blobs (files) with different names

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:02

Junio C Hamano wrote:
Jakub Narebski [off-list ref] writes:
quoted
Fix the bug that caused "blobdiff" view called with new style URI
for a rename with change diff to be show as new (added) file diff.
[...]
quoted
---
Junio, could you apply this? It looks like it was lost in the noise.
I was waiting for dust to settle.  Ack's from people involved in
the discussion would be nice.
I can understand that.

This patch is _a_ solution: it fixes "blobdiff" view for all blobdiff 
URIs gitweb generates now. But it is not _the_ solution, as it doesn't 
work with Martin work on adding "(base | diff)" links to allow to view 
diff between arbitrary commits, trees or blobs; which includes 
"blobdiff" view of arbitrary blobs.

So if/when Martin finishes his series of patches, this part would be 
rewritten. But it is some time in the future...
-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help