git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-archive: document CWD effect

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Apr 8, 2007, 12:28 UTC
Message-ID
<4618DFEE.8080707@lsrfire.ath.cx>
In-Reply-To
<esc64d$d2u$1@sea.gmane.org>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
Nick Williams schrieb:
Show 11 quoted lines
> 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
Previous: Johannes SchindelinNext: Junio C Hamano
Message 3 of 10 in “bug in git-archive?”
  1. Nick WilliamsMar 3, 2007
  2. Johannes SchindelinMar 3, 2007
  3. git-archive: document CWD effectRené Scharfe, Apr 8, 2007
  4. Junio C HamanoApr 8, 2007
  5. René ScharfeApr 9, 2007
  6. Junio C HamanoApr 9, 2007
  7. Andy ParkinsApr 9, 2007
  8. René ScharfeApr 10, 2007
  9. Junio C HamanoApr 10, 2007
  10. René ScharfeApr 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.