git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eli Barzilay <eli@barzilay.org>
To: Jakub Narebski <jnareb@gmail.com>, Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git check-attr in bare repositories
Date: Tue, 30 Mar 2010 23:15:58 -0400	[thread overview]
Message-ID: <19378.48750.465977.853886@winooski.ccs.neu.edu> (raw)
In-Reply-To: <20100330212222.GA11192@progeny.tock>, <m3iq8dij6r.fsf@localhost.localdomain>

On Mar 30, Jonathan Nieder wrote:
> Eli Barzilay wrote:
> > If anything, I'd like it if `check-attr' could just use the
> > repository directly instead of the index (or a work tree) in a
> > bare repository.
> 
> I think the right thing to do is to put this functionality in a new
> ‘git ls’ command.  Maybe something like this:
> 
>  $ git ls --format='%p %a(crlf)' master -- '*.txt'
>  some/path/foo.txt crlf:input
>  some/path/bar.txt crlf
>  some/path/other.txt !crlf
>  yet/another/path.txt 

This looks useful, but it has a problem of being lower level than
`check-attr' in the sense that you need to parse this output.


On Mar 30, Jakub Narebski wrote:
> 
> Well, that or make `git check-attr` support reading .gitattributes
> from repository (from a corresponding tree object).
> 
> Unfortunately `git check-attr` doesn't have place to put revision...
> well unless as a parameter:
> 
>   git check-attr [--cached|--tree <tree-ish>] <attr>... [--] <pathname>...

This looks like a better way to have what I need from it...  It also
looks useful for other uses -- for example, an attribute that is used
by a hook to specify that some file should not be deleted (so the hook
needs to look at the value before the commit).

(But in any case, I'd be happy if there was a way to make it read the
contents of a (temporary) index.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

  reply	other threads:[~2010-03-31  3:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-26  3:57 `git check-attr' problems & questions Eli Barzilay
2010-03-28  1:42 ` Jonathan Nieder
2010-03-29 15:28   ` Eli Barzilay
2010-03-29 16:09     ` Eli Barzilay
2010-03-29 23:15       ` git check-attr in bare repositories Jonathan Nieder
2010-03-30  4:53         ` Eli Barzilay
2010-03-30 21:22           ` Jonathan Nieder
2010-03-30 21:39             ` Jakub Narebski
2010-03-31  3:15               ` Eli Barzilay [this message]
2010-03-30 21:30           ` Carrying over attributes when moving files Jonathan Nieder
2010-03-31  3:30             ` Eli Barzilay
2010-03-31  4:05             ` 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=19378.48750.465977.853886@winooski.ccs.neu.edu \
    --to=eli@barzilay.org \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=jrnieder@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).