Re: [PATCH] gitweb: Support comparing blobs (files) with different names
- From
- Martin Koegler <mkoegler@auto.tuwien.ac.at>
- Date
- Mar 26, 2007, 20:41 UTC
- Message-ID
- <20070326204116.GB1128@auto.tuwien.ac.at>
- In-Reply-To
- <200703261912.09445.jnareb@gmail.com>
On Mon, Mar 26, 2007 at 06:12:09PM +0100, Jakub Narebski wrote:
Show 10 quoted lines
> 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
>
> instead of finding hash of a blob using git_get_hash_by_path subroutine
> or using extended SHA-1 syntax:
>
> git diff [options] hpb:fp hp:f
> As far as I tested, this only works for renames, not for comparing different objects, eg:
git-diff -r -p 08727ea8bba8c81678e5cf15124ada23ad097bc3:grep.h bb95e19c5f1e470d2efe1c0e4e04c291019e4b25:refs.h shows differences
git-diff-tree -r 08727ea8bba8c81678e5cf15124ada23ad097bc3 bb95e19c5f1e470d2efe1c0e4e04c291019e4b25 -- grep.h refs.h shows no difference
As I want gitweb to be able to even do such compares (not just renames), I'll still need a solution for this.
My idea is, that if I got hb:f and hpb:fp, the user exactly specified the blobs to be compared. Then I don't want any guessing logic.
mfg Martin Kögler