From: Jakub Narebski <jnareb@gmail.com>
To: "Santi Béjar" <santi@agolina.net>
Cc: Frank Li <lznuaa@gmail.com>, git@vger.kernel.org
Subject: Re: Git log can not show history before rename
Date: Fri, 30 Jan 2009 04:25:43 -0800 (PST) [thread overview]
Message-ID: <m33af1x9od.fsf@localhost.localdomain> (raw)
In-Reply-To: <adf1fd3d0901300329y53e46d91xda75799ce1244ddd@mail.gmail.com>
Santi Béjar <santi@agolina.net> writes:
> 2009/1/30 Frank Li <lznuaa@gmail.com>:
> > mkdir tt3
> > cd tt3
> > git init-db
>
> "git init"
>
> > touch a.c
> > git add a.c
> > git commit -a -m "test1"
> >
> > git mv a.c b.c
> > git commit -a -m "rename"
> >
> > modify b.c
> > git commit -a -m "test2"
> >
> > git log -C -M -- b.c
> [...]
> > I can't get history before rename.
>
> You asked to restrict the search to the b.c path.
>
> You want:
>
> git log --follow -- b.c
>
> Man git-log:
> --follow
> Continue listing the history of a file beyond renames.
Or use
$ git log -C -- b.c a.c
(you don't need '-M' option, as '-C' is superset of it).
Note that '--follow' works for simple histories, but (as it is quite
new invention) doesn't work yet for all cases, like for example
subtree merge or equivalent.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2009-01-30 12:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 11:23 Git log can not show history before rename Frank Li
2009-01-30 11:29 ` Santi Béjar
2009-01-30 12:25 ` Jakub Narebski [this message]
2009-01-30 12:29 ` Frank Li
2009-01-30 12:49 ` Santi Béjar
2009-01-30 21:52 ` Thomas Rast
2009-01-31 7:04 ` Jeff King
2009-01-30 17:17 ` Linus Torvalds
2009-01-30 17:23 ` Linus Torvalds
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=m33af1x9od.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=lznuaa@gmail.com \
--cc=santi@agolina.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).