Re: [RFC/PATCH 1/2] Add a useful return value to git-check-attr

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [RFC/PATCH 1/2] Add a useful return value to git-check-attr

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:04

Andy Parkins [off-list ref] writes:
git-check-attr previously always returned success.  With this patch it
returns success when the requested attribute is found for all supplied
paths.

This lets you check in a script whether a file has an attribute:

 $ git-check-attr attribute -- file && echo "file has attribute"
I wrote check-attr primarily to have a quick way to make sure
the attribute stack is working properly, but I agree making
gitattributes available to scripts is important to make it
useful in general.

And your patch was a step in the right direction based on my
previous patch.

But sorry, you were shooting at a target that is still moving
too fast, and you missed.  It's not your fault, as even I did
not know where it was heading to, but my plan has been to have
the scripts parse the text output, as we would need more than
true/false values, as I did in the four patch series I sent out
tonight.

Re: [RFC/PATCH 1/2] Add a useful return value to git-check-attr

From: Andy Parkins <hidden>
Date: 2016-06-15 22:43:05

On Tuesday 2007 April 17 10:28, Junio C Hamano wrote:
And your patch was a step in the right direction based on my
previous patch.

But sorry, you were shooting at a target that is still moving
too fast, and you missed.  It's not your fault, as even I did
not know where it was heading to, but my plan has been to have
the scripts parse the text output, as we would need more than
true/false values, as I did in the four patch series I sent out
tonight.
Not a problem.  It was a couple of seconds work.  I added it so that I could 
test my keyword expansion stuff.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help