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

Re: Determining if a file exists in a bare repo

From
Adam Mercer <ramercer@gmail.com>
Date
May 4, 2010, 16:57 UTC
Message-ID
<z2p799406d61005040957j93f8f4a3zfb8a9f38dbe7c72c@mail.gmail.com>
In-Reply-To
<7v7hnjoc3i.fsf@alter.siamese.dyndns.org>
On Tue, May 4, 2010 at 11:39, Junio C Hamano <gitster@pobox.com> wrote:
> Even if it returned an error status, you are discarding it by placing the
> process on the upstream side of the pipe, so your command line above won't
> be able to catch an error anyway.

Sorry I wasn't very clear, first I trying to use git-show if the file existed and then piping the output to rst2html...

Show 5 quoted lines
> I would probably do something like this
> if I were you:
>
>    git rev-parse --verify master:INSTALL >/dev/null 2>&1 &&
>    git cat-file blob master:INSTALL | rst2...
Thanks, thats a better approach!
Cheers
Adam
Previous: Junio C Hamano
Message 5 of 5 in “Determining if a file exists in a bare repo”
  1. Adam MercerMay 4, 2010
  2. Jacob HelwigMay 4, 2010
  3. Adam MercerMay 4, 2010
  4. Junio C HamanoMay 4, 2010
  5. Adam MercerMay 4, 2010

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.