From: Junio C Hamano <gitster@pobox.com>
To: Francois Marier <fmarier@gmail.com>
Cc: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>,
git@vger.kernel.org, "Nguyen Thai Ngoc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH] git-archive documentation: .gitattributes must be committed
Date: Wed, 10 Feb 2010 12:33:58 -0800 [thread overview]
Message-ID: <7veiks7rux.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vr5os7sl2.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Wed\, 10 Feb 2010 12\:18\:17 -0800")
Junio C Hamano <gitster@pobox.com> writes:
> René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
>
>> ... I think that the current
>> behaviour makes sense because it provides a repeatable default.
>
> I wouldn't insist on changing the default again too strongly, but I think
> the --worktree-attributes option should be advertised better in the
> documentation, as that mode of operation seems to match what the users
> expect better, and I think that is how this thread started.
How about this? Instead of stopping at saying "it is taken from the tree
and must be committed, period", we should continue giving insn to help
people who didn't do so to achieve what they want to do.
-- >8 --
Subject: archive documentation: attributes are taken from the tree by default
By default, git-archive takes attributes from the tree being archived.
People however often wonder why their attempts to affect the way how the
command archives their tree by changing .gitattributes in their work tree
fail.
Add a bit of explanatory note to tell them how to achieve what they want
to do.
Noticed-by: Francois Marier
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Documentation/git-archive.txt | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt
index 799c8b6..8d3e666 100644
--- a/Documentation/git-archive.txt
+++ b/Documentation/git-archive.txt
@@ -112,6 +112,14 @@ export-subst::
expand several placeholders when adding this file to an archive.
See linkgit:gitattributes[5] for details.
+Note that attributes are by default taken from the `.gitattributes` files
+in the tree that is being archived. If you want to tweak the way the
+output is generated after the fact (e.g. you committed without adding an
+appropriate export-ignore in its `.gitattributes`), adjust the checked out
+`.gitattributes` file as necessary and use `--work-tree-attributes`
+option. Alternatively you can keep necessary attributes that should apply
+while archiving any tree in your `$GIT_DIR/info/attributes` file.
+
EXAMPLES
--------
git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)::
next prev parent reply other threads:[~2010-02-10 20:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-10 2:51 [PATCH] git-archive documentation: .gitattributes must be committed Francois Marier
2010-02-10 19:07 ` René Scharfe
2010-02-10 19:27 ` Junio C Hamano
2010-02-10 19:33 ` Junio C Hamano
2010-02-10 20:00 ` René Scharfe
2010-02-10 20:18 ` Junio C Hamano
2010-02-10 20:33 ` Junio C Hamano [this message]
2010-02-11 3:48 ` Francois Marier
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=7veiks7rux.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=fmarier@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=rene.scharfe@lsrfire.ath.cx \
/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).