From: "Ronan Pigott" <ronan@rjp.ie>
To: git@vger.kernel.org
Subject: Archive from bare repo?
Date: Fri, 20 Sep 2024 17:48:39 +0000 [thread overview]
Message-ID: <4ace58897feee2d86839af1a36770e49810e59b8@rjp.ie> (raw)
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
next reply other threads:[~2024-09-20 17:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-20 17:48 Ronan Pigott [this message]
2024-09-20 17:53 ` Archive from bare repo? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ace58897feee2d86839af1a36770e49810e59b8@rjp.ie \
--to=ronan@rjp.ie \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox