From: Junio C Hamano <gitster@pobox.com>
To: Sergio Callegari <sergio.callegari@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git archive and trailing "/" in prefix
Date: Thu, 08 Oct 2009 09:26:59 -0700 [thread overview]
Message-ID: <7v4oq9j1gs.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: loom.20091008T172303-658@post.gmane.org
Sergio Callegari <sergio.callegari@gmail.com> writes:
> The git-archive man page indicates that if the --prefix option is passed to
> git-archive, it is compulsory to end the prefix with a "/"
No, it does not have to.
$ git archive --prefix=v1.6.0- v1.6.0 Makefile | tar xf -
$ make -f v1.6.0-Makefile
This is consistent with the way the same --prefix option can be used with
checkout-index. e.g. to swap Makefile in work tree and in the index:
$ edit Makefile
$ git checkout-index --prefix=old- Makefile
$ git update-index Makefile
$ mv old-Makefile Makefile
These may or may not be useful examples, but this feature has been with us
for a long time. I wouldn't be surprised if removing the ability to
archive or checkout with filename prefix (not leading directory path
prefix) causes grief to existing scripts of people.
next prev parent reply other threads:[~2009-10-08 16:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 15:35 Git archive and trailing "/" in prefix Sergio Callegari
2009-10-08 16:26 ` Junio C Hamano [this message]
2009-10-08 22:07 ` Sergio Callegari
2009-10-09 12:49 ` René Scharfe
2009-10-08 16:46 ` René Scharfe
2009-10-09 6:50 ` Junio C Hamano
2009-10-08 20:35 ` Linus Torvalds
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=7v4oq9j1gs.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=sergio.callegari@gmail.com \
/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).