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

[PATCH] git-archive: document CWD effect

From: René Scharfe <hidden>
Date: 2016-06-15 22:43:03
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Signed-off-by: Rene Scharfe <redacted>
---

Nick Williams schrieb:
git-archive only archives the current working dir (and sub dirs) even
when no paths are specified. For example, if I do

git archive --format=tar --prefix=git-1.5.0.2/ HEAD > ~/test/test.tar

from with in the Documentation dir, then I only get part of the tree.

Is this the intended behavior?

The reason I ask is that from my (mis)reading of the man page I expect
to get all of the tree unless paths are specified.
Sorry about the late reply.  Would these two additional manpage lines
clear things up for you?

Thanks,
René

diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 493474b..b688330 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -17,6 +17,9 @@ Creates an archive of the specified format containing the tree
 structure for the named tree.  If <prefix> is specified it is
 prepended to the filenames in the archive.
 
+Only the files and directories in the current working directory are
+included in archives created locally (i.e. without --remote).
+
 'git-archive' behaves differently when given a tree ID versus when
 given a commit ID or tag ID.  In the first case the current time is
 used as modification time of each file in the archive.  In the latter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help