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

git archive and glob pathspecs

From
Peter Wu <peter@lekensteyn.nl>
Date
Sep 2, 2014, 22:17 UTC
Message-ID
<7752133.8a4hJ4krff@al>
Hi,

The `git archive` seems to accept a pathspec judging from the error message (git version 2.1.0):

    git archive HEAD -- :x
    fatal: pathspec 'x' did not match any files

When I try to use deeper glob specs however, it throws an error (this also happens if I use `:(glob)**/Makefile`, tested in the git source tree):

    $ git archive HEAD -- ':(glob)*/Makefile'
    fatal: pathspec '*/Makefile' did not match any files

Strange enough, command `git log -- ':(glob)*/Makefile'` works. Any idea what is wrong?

Kind regards, Peter https://lekensteyn.nl

Next: Duy Nguyen
Message 1 of 9 in “git archive and glob pathspecs”
  1. Peter WuSep 2, 2014
  2. Duy NguyenSep 3, 2014
  3. Peter WuSep 13, 2014
  4. archive: support filtering paths with globNguyễn Thái Ngọc Duy, Sep 4, 2014
  5. Peter WuSep 13, 2014
  6. archive: support filtering paths with globNguyễn Thái Ngọc Duy, Sep 21, 2014
  7. Junio C HamanoSep 22, 2014
  8. Duy NguyenSep 22, 2014
  9. Junio C HamanoSep 23, 2014

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.