Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:03

René Scharfe [off-list ref] writes:
Junio C Hamano schrieb:
...
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help