Re: file rename causes history to disappear

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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_.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]