Re: using git-blame with patches as input

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

 



On Mon, Jun 16, 2008 at 02:45:59PM -0700, Junio C Hamano wrote:
> Don Zickus <dzickus@xxxxxxxxxx> writes:
> 
> > I deal with a lot of backported patches that are a combination of multiple
> > commits.  I was looking to develop a tool that would help me determine
> > which chunks of the patch are upstream (not necessarily currently in HEAD
> > but at some point in the file's history).
> >
> > For example, if I took the top three commits from HEAD and appended them
> > into one patch file and then ran this tool with the patch as input, I
> > would hope that it gave as output the three original commits.
> 
> A quick and dirty hack would be to:
> 
> 	rm .git/index
> 	sed -ne 's/^[+ ]//p' -e '/^@@/p' patches... >file
>         git add file
>         git commit -m 'only "a file" remains'
>         git blame -C -C -w file
> 
> which would try blaming all the postimage concatenated together ;-)

Heh.  Interesting.  I'll try that today.  Thanks.

Cheers,
Don

--
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]

  Powered by Linux