[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH 2/7] gitweb: Support comparing blobs with different names
From: mkoegler () auto ! tuwien ! ac ! at (Martin Koegler)
Date: 2007-04-30 5:27:02
Message-ID: 20070430052702.GA12744 () auto ! tuwien ! ac ! at
[Download RAW message or body]
On Sun, Apr 29, 2007 at 11:35:49PM +0200, Jakub Narebski wrote:
> On Monday, 16 April 2007, Martin Koegler wrote:
>
> > Currently, blobdiff can only compare blobs with different file
> > names, if no hb/hpb parameters are present.
> >
I've already posted a new version of this patch:
http://www.spinics.net/lists/git/msg28812.html
Can you please look at it.
> > Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
> > ---
> > New version, as I found a bug in the expiration handling code.
> >
> > I unified all blobdiff variants and added support for comparing blobs
> > with different names.
> >
> > If h/hp parameter are missing, I need to generate them with
> > git_get_hash_by_path, as the are needed for the html header, which is
> > generated before parsing the git-diff output.
>
> git_get_hash_by_path uses git-ls-tree but it does not catch all the info;
> perhaps git_get_info_by_path would be called for here.
I now only need the hash of the blob, if not passed as parameter, to
generate a correct header.
> [...]
> > + if (defined $hash_parent_base && defined $file_parent && !defined $hash_parent) {
> > + $hash_parent = git_get_hash_by_path($hash_parent_base, $file_parent);
> > + }
> [...]
> > + # open patch output
> > + open $fd, "-|", git_cmd(), "diff", @diff_opts,
> > + $hash_parent, $hash, "--"
> > + or die_error(undef, "Open git-diff failed");
>
> You would most probably use now "$hash_base:$file_name" instead of $hash
> if $hash_base is defined, i.e.
>
> defined $hash_base ? "$hash_base:$file_name" : $hash
>
> and similarly for $hash_parent parameter now that <tree>:<path> form
> respects mode changes information.
Addressed in new patch.
mfg Martin Kögler
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic