git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <junkio@cox.net>
Date
Apr 17, 2007, 09:28 UTC
Message-ID
<7vzm57pcxp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200704171010.49168.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
Show 7 quoted lines
> 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.

Previous: Andy ParkinsNext: Andy Parkins
Message 2 of 3 in “Add a useful return value to git-check-attr”
  1. 1/2 Add a useful return value to git-check-attrAndy Parkins, Apr 17, 2007
  2. Junio C HamanoApr 17, 2007
  3. Andy ParkinsApr 17, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.