Re: [PATCH] git-archive: document CWD effect

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

 



René Scharfe <rene.scharfe@xxxxxxxxxxxxxx> writes:

> Junio C Hamano schrieb:
> ...
>> Since people who _really_ want a subtree can
>> just say "git archive --format=tar HEAD:Documentation", I
>> suspect we may be better off not doing "current directory only"
>> by default.  This changes the behaviour, but (1) it affects only
>> people who run from a subdirectory, (2) it is counterintuitive
>> that your location in the working tree matters when you say "I
>> want a tarball of that commit", and (3) it is an undocumented
>> behaviour anyway.
>
> I agree with (1) and (3), meaning that we are free to change the
> behaviour.  I don't agree with (2), though.  I'd find it strange if
> changing the working directory wouldn't change the archive contents.
>
> We should keep consistency with the rest of git here.  Since git-archive
> is just a fancy git-ls-tree, I think we should mirror its behaviour with
> respect to the working directory.  (Which is what the current code does.
> Modulo bugs, of course.)

I am tempted to say "fair enough", but I would wait for others
to come up with objections I did not think of.


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