All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Zickus <dzickus@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: using git-blame with patches as input
Date: Tue, 17 Jun 2008 10:15:19 -0400	[thread overview]
Message-ID: <20080617141519.GK16941@redhat.com> (raw)
In-Reply-To: <7vej6x9hpk.fsf@gitster.siamese.dyndns.org>

On Mon, Jun 16, 2008 at 02:45:59PM -0700, Junio C Hamano wrote:
> Don Zickus <dzickus@redhat.com> 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

  reply	other threads:[~2008-06-17 14:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-16 21:35 using git-blame with patches as input Don Zickus
2008-06-16 21:45 ` Junio C Hamano
2008-06-17 14:15   ` Don Zickus [this message]
2008-06-16 21:54 ` Junio C Hamano
2008-06-16 22:08   ` Junio C Hamano
2008-06-17 14:17   ` Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080617141519.GK16941@redhat.com \
    --to=dzickus@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.