git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rev-list --cherry-pick and context lines
@ 2011-09-02 10:35 Stefan Haller
  2011-09-02 15:32 ` Michael J Gruber
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Haller @ 2011-09-02 10:35 UTC (permalink / raw)
  To: git

Consider two commits on different branches, one with this patch:

    diff --git a/file.txt b/file.txt
    index 704fa27..2f7e74c 100644
    --- a/file.txt
    +++ b/file.txt
    @@ -1,3 +1,3 @@
     old_context
     
    -foo
    +bar

and the other with this patch:

    diff --git a/file.txt b/file.txt
    index f35051b..8c7de32 100644
    --- a/file.txt
    +++ b/file.txt
    @@ -1,3 +1,3 @@
     new_context
     
    -foo
    +bar

If I run "git rev-list --cherry-pick --left-right branch1...branch2", it
reports both commits as being genuine commits on their respective
branch, even though I consider their patches to be the same.

I guess for my purpose I would like to have patch-ids that ignore
context (or that use only one line of context, I'm not sure which).

In fact, if I do "git show <commit> -U1 | git patch-id", both commits
show the same id.

So, would it make sense to have a parameter for git-rev-list (and
git-cherry) that lets you specify how much context to be used for the
patch ids?


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-02 19:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-02 10:35 rev-list --cherry-pick and context lines Stefan Haller
2011-09-02 15:32 ` Michael J Gruber
2011-09-02 16:33   ` Stefan Haller
2011-09-02 18:14     ` Vijay Lakshminarayanan
2011-09-02 18:45       ` Stefan Haller
2011-09-02 19:13     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).