Thread (3 messages) 3 messages, 2 authors, 2024-09-21

Archive from bare repo?

From: Ronan Pigott <hidden>
Date: 2024-09-20 17:48:43

Hi git,

I'm trying and failing to create a specific archive from a bare repo. The
following all works correctly:

  $ git clone https://my.git.repo/test --bare test
  $ git --git-dir=test archive @ | tar -tf - # archive of full repo
  $ git --git-dir=test cat-file -p @:.gitattributes # shows subset of files with myattr set
  $ git --work-tree=/var/empty --git-dir=test reset --mixed
  $ git --work-tree=/var/empty --git-dir=test ls-files ':(attr:myattr)' # list of files with myattr set

Now I get:

  $ git --git-dir=test archive @ ':(attr:login)'
  fatal: pathspec ':(attr:login)' did not match any files

The manpage indicates that git-archive should use the .gitattributes from the
archived tree, and as indicated above it has the expected content. Why doesn't
this produce an archive with the files listed by ls-files from above? Is there
a way to achive the archive I want?

Thanks,
Ronan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help