From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Neal Kreitzinger <nkreitzinger@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
Neal Kreitzinger <neal@rsss.com>,
git@vger.kernel.org
Subject: Re: git-archive and tar options
Date: Mon, 18 Jul 2011 22:50:21 +0200 [thread overview]
Message-ID: <4E249C8D.10107@lsrfire.ath.cx> (raw)
In-Reply-To: <4E248A2E.3090902@gmail.com>
Am 18.07.2011 21:31, schrieb Neal Kreitzinger:
> In regards to use cases in general, my impression is that git-archive is
> for producing archives useful for deployment. The target deployed
> structure may vary so expecting the source git repo to reflect this is
> unfeasable. It seems like utilizing the local tar installation would
> effect the necessary transformations. I'm not sure what the source and
> target tar version disparity problems might me.
Direct deployment is not an _intended_ use case, but I see that it might
be useful for that, especially with scripting languages.
I'm not sure I like tar's --transform option, though. This seems to be
too heavy a solution. For your example it would be enough to support
multiple tree arguments (with their own respective prefixes) in one go.
> A practical problem with the pax header is that its only useful if you
> still have the archive. Archives usually get deleted after being
> extracted. Therefore, an option to also generate (and add to the
> archive) an automatic "VERSION.TXT" file of some sort which specifies
> the context of the archive would be much more useful. It would need its
> own --prefix option because oftentimes it would be dynamically generated
> based on the git-archive request.
The attribute export-subst with its $Format:$ expansion is intended to
be used for such version files. It still lacks the ability to produce
git-describe-style version strings, but commit hashes can be used instead.
> Another use case is that it seems like there should also be the option
> to only tar the objects changed between a specified range of commits.
> However, I'm not sure if tar can handle deletions (moves, deletions,
> renames) upon extraction in this context.
Well, you could build a list of paths using git log --name-status or
similar and feed that to git archive. If you want to keep a directory
in sync with a repo, why not use git checkout, though? :)
> I can see that my use cases are something that I can script myself, but
> to do so it seems like I would be better off using a non-bare repo
> checkout as an intermediary. If that is what I am expected to do then I
> am not sure what the usefulness of git-archive is intended to be. Maybe
> I don't understand what others use it for.
The primary use case is to create source code archives that people can
download, build and deploy who are not interested in downloading the
whole history or in using git at all.
René
next prev parent reply other threads:[~2011-07-18 20:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 23:34 git-archive and tar options Neal Kreitzinger
2011-07-14 1:56 ` Jeff King
2011-07-14 17:16 ` René Scharfe
2011-07-14 17:27 ` Jeff King
2011-07-14 17:45 ` René Scharfe
2011-07-14 18:18 ` Jeff King
2011-07-14 19:12 ` Jakub Narebski
2011-07-14 21:23 ` Junio C Hamano
2011-07-14 21:25 ` Jeff King
2011-07-14 23:30 ` Junio C Hamano
2011-07-15 20:59 ` René Scharfe
2011-07-18 19:31 ` Neal Kreitzinger
2011-07-18 20:50 ` René Scharfe [this message]
2011-07-14 21:38 ` Jakub Narebski
2011-07-18 18:13 ` Neal Kreitzinger
2011-07-18 20:50 ` René Scharfe
2011-07-19 0:12 ` Neal Kreitzinger
2011-07-19 17:56 ` René Scharfe
2011-07-21 2:13 ` Neal Kreitzinger
2011-07-21 16:59 ` Neal Kreitzinger
2011-07-14 17:48 ` Andreas Schwab
2011-07-19 20:10 ` Sylvain Rabot
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=4E249C8D.10107@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=neal@rsss.com \
--cc=nkreitzinger@gmail.com \
--cc=peff@peff.net \
/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;
as well as URLs for NNTP newsgroup(s).