git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Toby Corkindale <toby.corkindale@rea-group.com>,
	git@vger.kernel.org
Subject: Re: [BUG?] git-archive ignores remote .gitattributes
Date: Sun, 30 Mar 2008 20:07:25 -0700	[thread overview]
Message-ID: <7vbq4vsiaa.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080331024755.GA690@coredump.intra.peff.net> (Jeff King's message of "Sun, 30 Mar 2008 22:47:55 -0400")

Jeff King <peff@peff.net> writes:

> I thought there was some discussion of that a while ago (or possibly of
> looking up .gitignore in the same way).

Perhaps we would want two distinct modes in dir.c (gitignore stack) and
attr.c (gitattributes stack).  The current code implements the normal mode
that uses the files from the work tree (so that you can modify .gitigore
and expect it to take effect immediately) and fall back to .index (as the
general principle, low-level part of git pretends missing files are
unmodified files when they can).  The new mode, which would be appropriate
for commands such as "archive", would be triggered by first declaring that
the program is going to work on a single tree object, and will cause the
gitignore and gitattributes to be read from that tree (and only that
tree).

Even a longer term clean-up would be (and this is probably a good GSoC
sized project):

 - Unify gitignore and gitattributes stacks;

 - Maintain two or more gitignore/gitattributes stacks in effect at the
   same time.  Things like "git diff-tree $tree1 $tree2", "git diff-index
   --cached $tree", "git diff-index $tree", and "git archive $tree" should
   take attr/ignore from their respective places.

  reply	other threads:[~2008-03-31  3:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27  3:08 .git/info/attributes not cloned Toby Corkindale
2008-03-27  3:33 ` Jeff King
2008-03-27  4:23   ` Toby Corkindale
2008-03-27  4:29     ` Jeff King
2008-03-27  4:48       ` Toby Corkindale
2008-03-27  4:53         ` Jeff King
2008-03-28  5:10           ` [BUG?] git-archive ignores remote .gitattributes (was: .git/info/attributes not cloned) Toby Corkindale
2008-03-28 12:22             ` Johannes Schindelin
2008-03-28 13:02               ` Jakub Narebski
2008-03-28 13:22                 ` Johannes Schindelin
2008-03-31  2:47               ` Jeff King
2008-03-31  3:07                 ` Junio C Hamano [this message]
2008-04-10  4:14               ` [BUG?] git-archive ignores remote .gitattributes Toby Corkindale

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=7vbq4vsiaa.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=toby.corkindale@rea-group.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).