All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Eli Barzilay <eli@barzilay.org>
Cc: Eugene Sajine <euguess@gmail.com>,
	Jacob Helwig <jacob.helwig@gmail.com>,
	git@vger.kernel.org
Subject: Re: git log -M -- filename is not working?
Date: Fri, 07 May 2010 13:28:07 -0700 (PDT)	[thread overview]
Message-ID: <m3ocgre9ul.fsf@localhost.localdomain> (raw)
In-Reply-To: <19428.24021.324557.517627@winooski.ccs.neu.edu>

Eli Barzilay <eli@barzilay.org> writes:

> On May  7, Eugene Sajine wrote:
> > On Fri, May 7, 2010 at 2:10 PM, Jacob Helwig <jacob.helwig@gmail.com> wrote:
> > > You want the --follow flag, too.
> > 
> > Thanks! I missed this guy. By the way it seems that --follow flag
> > works without -M or -C.
> > 
> > Are those deprecated or I'm missing the difference between three of
> > them??
> 
> BTW, I've had at least 4 people now who got confused by this.  Is
> there any use for -M/-C without --follow?  In any case, it will be
> very helpful if the -M/-C descriptions said "see also --follow".

Yes, '-M/-C' is useful with "git diff" _without_ pathspec, including
e.g. "git show -C".

The problem with "git log -M -- <filename>" is that history simplification,
which is required for good performance, happens before diff mechanism has a
chance to perform rename detection.  Before there was '--follow' option to
git-log (which supports only the case of single file, and doesn't work that
well with more complicated history), you were forced to do

  $ git log -M -- <filename> <oldname> <oldername>...

> 
> Also, is there a way to set this as the default for `git log'?

I don't think so.  Note also that '--follow' works only with single file,
and does not work for example (currently) with directory pathspec.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  parent reply	other threads:[~2010-05-07 20:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 18:07 git log -M -- filename is not working? Eugene Sajine
2010-05-07 18:10 ` Jacob Helwig
2010-05-07 18:31   ` Eugene Sajine
2010-05-07 18:37     ` Eli Barzilay
2010-05-07 20:25       ` Matthieu Moy
2010-05-07 20:28       ` Jakub Narebski [this message]
2010-05-08  4:44       ` Jeff King
2010-05-08  5:12         ` Eli Barzilay
2010-05-08  5:30           ` Jeff King
2010-05-08  7:08             ` Eli Barzilay
2010-05-12 11:38               ` Jeff King
2010-05-12 12:01                 ` Eli Barzilay
2010-05-12 12:49                   ` Jeff King
2010-05-12 13:03                     ` Jeff King
2010-05-12 14:35                     ` Eli Barzilay
2010-05-12 16:07                       ` Bo Yang
2010-05-12 16:45                         ` Jeff King
2010-05-13  2:12                           ` Bo Yang
2010-05-13  4:39                             ` Eli Barzilay
2010-05-14  4:55                       ` Jeff King
2010-05-14  5:05                         ` Eli Barzilay
2010-05-12 13:06                   ` Bo Yang
2010-05-12 13:09                     ` Jeff King
2010-05-12 14:42                     ` Eli Barzilay
2010-05-12 14:49                       ` Bo Yang
2010-05-08  5:39           ` Junio C Hamano

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=m3ocgre9ul.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=eli@barzilay.org \
    --cc=euguess@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jacob.helwig@gmail.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.