Re: [RFC/PATCH 2/2] blame: fix output in case of replacement by using parse_commit_repl()

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

 



On Tuesday 17 August 2010 05:44:11 Nguyen Thai Ngoc Duy wrote:
> On Tue, Aug 17, 2010 at 11:59 AM, Christian Couder
> 
> <chriscool@xxxxxxxxxxxxx> wrote:
> > git blame was not showing the sha1 of the replacement commit while
> > it was properly showing other information from the replacement commit,
> > because parse_commit() is buggy regarding replacement.
> > 
> > Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx>
> > ---
> >  builtin/blame.c    |    4 ++--
> >  t/t6050-replace.sh |    8 ++++++++
> >  2 files changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/builtin/blame.c b/builtin/blame.c
> > index 8f9e7b0..c469e09 100644
> > --- a/builtin/blame.c
> > +++ b/builtin/blame.c
> > @@ -1226,7 +1226,7 @@ static void pass_blame(struct scoreboard *sb,
> > struct origin *origin, int opt)
> > 
> >                        if (sg_origin[i])
> >                                continue;
> > -                       if (parse_commit(p))
> > +                       if (parse_commit_repl(&p))
> 
> This is the hard way. There are another ~40 parse_commit() calls
> elsewhere. Most of them are in git commands, so we can check one by
> one. There are some calls in revision.c, sha1_name.c, tree.c,
> upload-pack.c and walker.c, which may be used in many places. Checking
> them would be harder.

Yeah, I will try to provide test cases but it may not be possible in some 
cases.

Best regards,
Christian.
--
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]