git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: What should a user expect from git log -M -- file
Date: Thu, 26 Nov 2009 09:14:37 -0800 (PST)	[thread overview]
Message-ID: <m3ocmpmcoq.fsf@localhost.localdomain> (raw)
In-Reply-To: <20091126163654.GA14509@glandium.org>

Mike Hommey <mh@glandium.org> writes:

> I recently reorganized a project of mine, and the result is that a lot of
> files moved from the top directory to a sub directory.
> 
> Now, I innocently tried to 'git log -M' some of these files in the
> subdirectories, and well, the history just stops when the file was
> created. Obviously, if I put both the old and the new location it works,
> but shouldn't users expect 'git log -M -- file' to try to find the
> previous path and continue from there ?

What you want is not

  git log -M -- file

but

  git log --follow file

"git log -M -- file" IIRC first applies path limiting, simplifying
history, *then* does rename detection, and finally filters output
(unless --full-diff is used).

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2009-11-26 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-26 16:36 What should a user expect from git log -M -- file Mike Hommey
2009-11-26 17:14 ` Jakub Narebski [this message]
2009-11-27  7:28   ` Mike Hommey

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=m3ocmpmcoq.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    /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).