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

Re: [PATCH] A few more options for git-cat-file

From
Junio C Hamano <junkio@cox.net>
Date
Dec 4, 2005, 06:17 UTC
Message-ID
<7vu0dptmh3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<43924D1C.8070306@zytor.com>
"H. Peter Anvin" <hpa@zytor.com> writes:
> This adds the following options to git-cat-file:
>
> -n, to get the canonical name of a resource.  This is for one thing 
> useful in tagging scripts.
Isn't "git-rev-parse --verify" good enough?
> -e, to test for the existence of a file.

This might be useful and cleaner than "cat-file -s >/dev/null" but marginally so. While reading the whole file and discarding that to /dev/null is wasteful and would go against tastes of many people, -t and -s flags do not need to read the whole thing and not so expensive.

Previous: H. Peter AnvinNext: H. Peter Anvin
Message 2 of 3 in “A few more options for git-cat-file”
  1. A few more options for git-cat-fileH. Peter Anvin, Dec 4, 2005
  2. Junio C HamanoDec 4, 2005
  3. H. Peter AnvinDec 4, 2005

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.