From: Junio C Hamano Date: Mon, 09 Apr 2007 20:00:03 GMT Subject: Re: [PATCH] git-archive: document CWD effect Message-ID: <7v7islz5bw.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <461A55FB.6070600@lsrfire.ath.cx> René Scharfe 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.