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

git archive has confusing error messages

From
Matthias Görgens <matthias.goergens@gmail.com>
Date
Mar 6, 2023, 10:25 UTC
Message-ID
<CA+X7ob8DWGmoVTxSVvrFN68V=pcaZripfP=s+LpWvXN-6L7W7Q@mail.gmail.com>
Hi,
Here's something I noticed back in 2012 or so, and stumbled upon again recently.
Start eg at the root of git's own repository:

$ cd xdiff/ $ git archive --format=tar HEAD .. | tar t fatal: ..: '..' is outside repository at '/Users/matthias/prog/git'

In the best case, I would have hoped to get an archive of the whole repository here. At a minimum, I would hope for an error message that was less confusing: the directory I was referring to is very much inside the repository.

For comparison, `git -C .. archive --format=tar HEAD | tar t` has the behaviour that I would expect in this scenario: a tarball of the whole repository.

(I don't know enough about git to produce a patch to fix this at this point, but I can try looking into fixing this.)

Thanks, Matthias.

Message 1 of 1 in “git archive has confusing error messages”
  1. Matthias GörgensMar 6, 2023

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.