git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git discussion list <git@vger.kernel.org>,
	Jay Soffian <jaysoffian@gmail.com>, Jeff King <peff@peff.net>
Subject: Re: How to use git attributes to configure server-side checks?
Date: Fri, 23 Sep 2011 12:38:11 +0200	[thread overview]
Message-ID: <4E7C6193.2020201@alum.mit.edu> (raw)
In-Reply-To: <m3vcskqjcv.fsf@localhost.localdomain>

On 09/23/2011 12:54 AM, Jakub Narebski wrote:
> There is a slight problem from the UI point of view of git-check-attr,
> namely that there are _three_ pieces of information: a place to read
> .gitattributes from (working tree, index, commit), list of attributes
> to check (or --all) and list of files (list of paths).  You can use
> "--" to separate _two_ pieces of information.

An alternative would be to accept <rev>:<path>, :<n>:<path>, and :<path>
in addition to simple <path>.

I also just remembered that currently the paths passed to
git-check-attr, git_check_attr(), and git_all_attrs() do not have to
correspond to existing objects; the paths are compared as strings.
Presumably we should retain this aspect of the behavior even if a
revision or tree is specified explicitly.

There are other problems in the UI of git-check-attr:

1. Its "-z" option affects how standard input is interpreted; there is
no way to cause the output to be generated with NUL separators.

2. Its output does not distinguish between the special statuses
unspecified/unset/set and possible string values
"unspecified"/"unset"/"set".

Maybe a --porcelain option could be used to overcome these shortcomings.

If necessary we could deprecate "git check-attr" and implement an
improved command ("git get-attr"?) that starts from a clean UI slate.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

  reply	other threads:[~2011-09-23 10:38 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21 19:32 How to use git attributes to configure server-side checks? Michael Haggerty
2011-09-21 20:02 ` Jay Soffian
2011-09-21 20:17 ` Junio C Hamano
2011-09-22  8:28   ` Michael Haggerty
2011-09-22 15:41     ` Jay Soffian
2011-09-22 17:13       ` Jeff King
2011-09-22 18:41         ` Jay Soffian
2011-09-22 19:22           ` Junio C Hamano
2011-09-22 20:58           ` Jeff King
2011-09-22 21:04             ` Jeff King
2011-09-23 10:06             ` Michael Haggerty
2011-09-23 19:33               ` Jeff King
2011-09-23 19:40                 ` Junio C Hamano
2011-09-23 19:44                   ` Jeff King
2011-09-24  6:05                 ` Michael Haggerty
2011-09-24  6:15                   ` Jeff King
2011-09-24 11:03                     ` Michael Haggerty
2011-09-26  4:09                       ` Junio C Hamano
2011-09-26  4:28                         ` Michael Haggerty
2011-09-26 11:05                       ` Jeff King
2011-09-26 14:14                         ` Jakub Narebski
2011-09-26 15:11                         ` Michael Haggerty
2011-09-22 17:26     ` Junio C Hamano
2011-09-23  8:35       ` Michael Haggerty
2011-09-23 12:49         ` Stephen Bash
2011-09-23 13:31           ` Michael Haggerty
2011-09-22 22:54     ` Jakub Narebski
2011-09-23 10:38       ` Michael Haggerty [this message]
2012-02-17 18:42   ` Michael Haggerty
2012-02-17 19:26     ` Junio C Hamano
2012-02-17 19:59       ` Junio C Hamano

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=4E7C6193.2020201@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jaysoffian@gmail.com \
    --cc=jnareb@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).