Re: Git blame only current branch

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

 



----- Original Message -----
> From: "Jeff King" <peff@xxxxxxxx>
> Sent: Monday, December 12, 2011 11:55:42 AM
> Subject: Re: Git blame only current branch
> 
> On Mon, Dec 12, 2011 at 10:24:47AM -0500, Stephen Bash wrote:
> 
> > I'm curious if there's a method to make git blame merge commits
> > that introduce code to the given branch rather than commits on 
> > the original (topic) branch?  For example:
> 
> Usually when you are interested in seeing merges like this in
> git-log, you would use one of "--first-parent" or "--merges". 
> However, though "git blame" takes revision arguments, it does
> its own traversal of the graph that does not respect those 
> options.

My first thought was --first-parent, and was disappointed when I didn't find it in the blame documentation :)  I think for my purposes --first-parent is better than --merges because there are non-merge commits on the branch(es) of interest (and thus I think the problem would become ill-posed in the --merges case).

> Modifying it to do --first-parent is pretty easy:
> ... snip ...

That's pretty simple...  I'll try to do a little testing this afternoon.

Thanks!
Stephen
--
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]