From: Jeff Garzik <jeff@garzik.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: file rename causes history to disappear
Date: Wed, 06 Sep 2006 11:46:19 -0400 [thread overview]
Message-ID: <44FEED4B.30909@garzik.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0609060834520.27779@g5.osdl.org>
Linus Torvalds wrote:
>
> On Wed, 6 Sep 2006, Jeff Garzik wrote:
>> I moved a bunch of SATA drivers in the Linux kernel from drivers/scsi to
>> drivers/ata.
>>
>> When I tried to look at the past history of a file using git-whatchanged,
>> post-rename, it only shows the history from HEAD to the point of rename.
>> Everything prior to the rename is lost.
>>
>> I also tried git-whatchanged on the old path, but that produces an error.
>
> For filenames that don't exist right now, you need to clearly separate the
> revision name from the filename (ie you need to use "--").
>
> There were patches to do "--follow-rename" which I don't think got applied
> yet, but in the meantime, just do
>
> git whatchanged -M -- drivers/ata/filename.c drivers/scsi/filename.c
>
> where the "-M" means "show diffs as renames if possible" (which is
> different from having the history actually _follow_ them), and the "--" is
> the filename separator to tell git that the nonexistent
> "drivers/ata/filename.c" file isn't a (currently) nonexistent revision
> name, it's a (currently) nonexistent _filename_.
Since I'm just interested in the log (ATM), even the lack of "-M" seems
to produce useful results. Thanks.
IMO it is highly counter-intuitive that renames are -not- followed. I
don't see the point of a "--follow-rename", it should Just Work(tm).
Jeff
next prev parent reply other threads:[~2006-09-06 15:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-06 14:52 file rename causes history to disappear Jeff Garzik
2006-09-06 15:05 ` Timo Hirvonen
2006-09-06 15:38 ` Linus Torvalds
2006-09-06 15:46 ` Jeff Garzik [this message]
2006-09-06 16:14 ` Linus Torvalds
2006-09-06 16:37 ` Linus Torvalds
2006-09-06 19:29 ` Junio C Hamano
2006-09-06 21:45 ` Randal L. Schwartz
2006-09-07 0:52 ` Junio C Hamano
2006-09-07 10:16 ` Alex Riesen
2006-09-06 17:11 ` Jakub Narebski
2006-09-06 18:34 ` Linus Torvalds
2006-09-06 18:52 ` Jakub Narebski
2006-09-06 19:06 ` Linus Torvalds
2006-09-06 23:54 ` Junio C Hamano
2006-09-06 19:25 ` Jakub Narebski
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=44FEED4B.30909@garzik.org \
--to=jeff@garzik.org \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.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).