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

Re: git archive without path

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Dec 4, 2009, 23:11 UTC
Message-ID
<4B199705.5010202@lsrfire.ath.cx>
In-Reply-To
<20091130123203.GA11235@dpotapov.dyndns.org>
Dmitry Potapov schrieb:
Show 8 quoted lines
> I have never run "git archive" inside of a subdirectory but somehow I
> have always assumed that it creates an archive containing all files in
> it regardless the current directory. In fact, the git-archive man page
> says so:
> 
> path
>     If one or more paths are specified, include only these in the
>     archive, otherwise include all files and subdirectories.

This sentence doesn't specify whose files and subdirectories are to be included -- those in the repository's root or those in the current directory. Let's fix that.

-- >8 --
Subject: archive: clarify description of path parameter
Mention that path parameters are based on the current working directory.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
--
 Documentation/git-archive.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 3d1c1e7..e579791 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -74,8 +74,9 @@ OPTIONS
 	The tree or commit to produce an archive for.
 
 path::
-	If one or more paths are specified, include only these in the
-	archive, otherwise include all files and subdirectories.
+	Without an optional path parameter, all files and subdirectories
+	of the current working directory are included in the archive.
+	If one or more paths are specified, only these are included.
 
 BACKEND EXTRA OPTIONS
 ---------------------
Previous: Junio C Hamano
Message 5 of 5 in “git archive without path”
  1. Dmitry PotapovNov 30, 2009
  2. Michael J GruberNov 30, 2009
  3. Dmitry PotapovNov 30, 2009
  4. Junio C HamanoNov 30, 2009
  5. René ScharfeDec 4, 2009

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.