public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* Archive from bare repo?
@ 2024-09-20 17:48 Ronan Pigott
  2024-09-20 17:53 ` Ronan Pigott
  2024-09-21 20:23 ` [PATCH] archive: load index before pathspec checks René Scharfe
  0 siblings, 2 replies; 4+ messages in thread
From: Ronan Pigott @ 2024-09-20 17:48 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-21 22:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 17:48 Archive from bare repo? Ronan Pigott
2024-09-20 17:53 ` Ronan Pigott
2024-09-21 20:23 ` [PATCH] archive: load index before pathspec checks René Scharfe
     [not found]   ` <f8e0ad836366480e32ec5b40b753cb533dd41cb6@rjp.ie>
2024-09-21 22:02     ` René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox