Re: Git archive and trailing "/" in prefix

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

 




On Thu, 8 Oct 2009, Sergio Callegari wrote:
> 
> The git-archive man page indicates that if the --prefix option is passed to
> git-archive, it is compulsory to end the prefix with a "/"

Yeah, that part is intentional. And:

> As a matter of fact, the archiver behaves quite strangely if that slash is
> missing. Files in the root of the working dir are added to the archive with
> their own name modified by the prefix and the same happens for working dir
> sub-directories.

So far so good. But

> However, no file present in the sub-directories, nor sub-sub-directories 
> are added.

Ok, that is a bug. It's supposed to just add the prefix to everything, and 
it sounds like it's simply broken. I wonder how long it's been broken? 
Perhaps forever. 

> I would like to know if there some reason why a trailing "/" is not added
> automatically to the prefix when it is missing and the prefix is not empty.
> Would that break anything?

It really was meant to be useful to prefix things without forcing a 
directory structure. IOW, being able to use "--prefix=compat-" and just 
have everything unpack with their own names, but with the prefix.

Whether anybody uses that, and whether it's worth it, I can't say.

			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]