git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Blackburn <jamesblackburn@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Jakub Narebski <jnareb@gmail.com>, git@vger.kernel.org
Subject: Re: git log --follow doesn't follow a rename over a merge
Date: Thu, 16 Jun 2011 19:21:33 +0100	[thread overview]
Message-ID: <BANLkTimmKnzD7LTApxzw5oTpvLU7oM0yjw@mail.gmail.com> (raw)
In-Reply-To: <20110616173451.GB6584@sigill.intra.peff.net>

> Doesn't:
>  git log -- plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBreakpoints.java
> do that?

Unfortunately that returuns no output.

If I add --follow, I get history:
git log --follow --oneline --
plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/service/IBreakpoints.java
10580b5 Updated copyright statements.
...

Where 10580 is a distant parent of c1e6da which was merged in to 5b47187.

On 16 June 2011 18:45, Jeff King <peff@peff.net> wrote:
> Usually you would graft the tip of the old history to the root commit of
> the new history. So it's not a merge, but makes it look like a
> contiguous linear history near the graft. But that's only a
> per-repository thing. If you want to join two histories in the actual
> history graph, you would merge them; if one supersedes the other, then
> you would use the "ours" merge strategy to ignore the other side.

In this case the commit is a 'merge' commit as history looks like:

  2002 ---o----o-----o-----o-----X-----o-----o-----o--- 2011         (CDT)
                                     /
  2006 ---o----o-----o-----o--   (2009)                                  (DSF)

CDT has existed since 2002. In 2006, at X, DSF was committed onto HEAD
of  CDT.  Basically wholesale apart from the path (Java package)
change (+some minor changes to 'import's).

So I created a graft from the commit which made it appear from CDT
onto the HEAD of a DSF as it was when the import happened.  Which
makes X have two parents.

Cheers,
James

      parent reply	other threads:[~2011-06-16 18:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 22:41 git log --follow doesn't follow a rename over a merge James Blackburn
2011-06-16 13:25 ` Jakub Narebski
2011-06-16 13:31   ` James Blackburn
2011-06-16 17:01     ` James Blackburn
2011-06-16 17:45       ` Jeff King
2011-06-16 17:34     ` Jeff King
2011-06-16 17:59       ` Junio C Hamano
2011-06-16 18:15         ` Jeff King
2011-06-16 19:41           ` James Blackburn
2011-06-16 18:41         ` James Blackburn
2011-06-16 19:36           ` Junio C Hamano
2011-06-16 21:29             ` James Blackburn
2011-06-16 22:14           ` James Blackburn
2011-06-16 18:21       ` James Blackburn [this message]

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=BANLkTimmKnzD7LTApxzw5oTpvLU7oM0yjw@mail.gmail.com \
    --to=jamesblackburn@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=peff@peff.net \
    /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 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).