git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Yann Dirson" <ydirson@altern.org>
Cc: git@vger.kernel.org
Subject: Re: show/diff --check clarification needed
Date: Thu, 28 Jan 2010 12:25:22 -0800	[thread overview]
Message-ID: <7vmxzykmdp.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <d26982ce92a061ee24d04aba6e314fa4.squirrel@intranet.linagora.com> (Yann Dirson's message of "Wed\, 27 Jan 2010 11\:41\:28 +0100")

"Yann Dirson" <ydirson@altern.org> writes:

> Unless I missed something, I suggest the following plan:
>
> - document in maint that --check only takes worktree into account when
>   looking for .gitattributes, and more globally add a note to the
>   gitattributes manpage to explicitely say that too.

It is not limited to "diff --check".  The current implementation reads
attributes only from the checked out work tree and/or from the index,
depending on the direction of operation (e.g. checking out files to work
tree reads from the index, I think).  The same issue would affect "git
archive" when generating a tarball from an older revision.

The exception is $GIT_DIR/info/gitattributes, and for your particular
purpose, I think it is the right one to use, because the entries in that
file will apply regardless of which version you are examining patches
from.

> - add a global flag to allow something like
>   "git --attributes-tree=<treeish> <command>"

I am not sure if this is what we really want.  It seems to me that it
would make more sense to read from a relevant tree that the <command>
is operating on, if we are to enhance the attributes implementation.  If
that <treeish> is a fixed one, it is not much better than having necessary
entries in your $GIT_DIR/info/gitattributes file.

> - adjust defaults to agreed-upon values
> - add any config entries that would be meaningful

Sorry, I have no idea what you mean by these two points.

Thanks.

  reply	other threads:[~2010-01-28 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 10:41 show/diff --check clarification needed Yann Dirson
2010-01-28 20:25 ` Junio C Hamano [this message]
2010-01-28 21:38   ` Yann Dirson

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=7vmxzykmdp.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ydirson@altern.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;
as well as URLs for NNTP newsgroup(s).