Re: file rename causes history to disappear

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

 



Linus Torvalds wrote:

>> git-rev-list could then output hash with current set of <filenames>, which
>> were given <filename> at the beginning, i.e.
>>   <hash> -- <filename> [<filename>...]
> 
> I would argue that "--follow" would be incompatible with having other 
> <paths> listed. But maybe there is some sensible rule for what the 
> combination means (show the listed paths _and_ the file we're following?) 
> I dunno.

I'm not that sure. The output could be changed to, for example
  <hash> SP <quoted-filename> [SP <quoted-filename> ...]
although I'm not sure if git can detect that two files were joined into one
(or, in reverse that one file was split into several; this doesn't matter
for following history of a file from top)

But --follow=<filename> with <pathspec> can be useful, e.g. when <pathspec> 
is a directory (or, perhaps in the future, glob), which would mean "follow
the contents indicated in starting hash by <filename>, and stop following
when it falls out outside given <pathspec>, in our case given directory".

As pathspecs doesn't change, there is no need to output them.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


-
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]