git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Blackburn <jamesblackburn@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>, 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 22:29:36 +0100	[thread overview]
Message-ID: <BANLkTi=7yFdkNgvGX38JM_GbS7=tqf=1sQ@mail.gmail.com> (raw)
In-Reply-To: <7vlix1h8lz.fsf@alter.siamese.dyndns.org>

On 16 June 2011 20:36, Junio C Hamano <gitster@pobox.com> wrote:
> James Blackburn <jamesblackburn@gmail.com> writes:
>
>> Given the file was removed during my 'merge' graft in commit X,
>> shouldn't it be visible  in log without --simplify-merges?
>
> The merge simplification logic does not treat earlier parent commits any
> differently than later parent commits of a merge (except when two parents
> are the same with respect to a given pathspec, and if the logic needs to
> pick only one, the earlier parent will be picked), and that is by design.
>
> So the short answer is no.

I think this is quite tough to grok.  Git blame shows me a path, and
git log -- <path> returns no output in the simple example I gave.

In this case --simplify-merges gives me a complete log for the path,
but man git-log tells me it should do the opposite:
       --simplify-merges
           Additional option to --full-history to remove some needless
merges from the resulting history, as there are
           no selected commits contributing to this merge.

I'm not sure how I would have figured out this switch might be just
the trick to show the commits that touched this path, without your
input.

As a naive user I expected:
  git log -- four
to tell we which commits changed the path 'four'. Especially those
commits which are reachable from my current HEAD.  I don't really
understand why one branch of history is worth following over another,
especially as the branch chosen, the older one, doesn't contain 'four'
at all.

Cheers,
James

  reply	other threads:[~2011-06-16 21:29 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 [this message]
2011-06-16 22:14           ` James Blackburn
2011-06-16 18:21       ` James Blackburn

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='BANLkTi=7yFdkNgvGX38JM_GbS7=tqf=1sQ@mail.gmail.com' \
    --to=jamesblackburn@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --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).