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

Re: Is "show-ref -h" a good test for an empty repository?

From
Jeff King <peff@peff.net>
Date
Sep 7, 2008, 17:34 UTC
Message-ID
<20080907173434.GA26182@coredump.intra.peff.net>
In-Reply-To
<7vprnfn9pz.fsf@gitster.siamese.dyndns.org>
On Sun, Sep 07, 2008 at 10:31:52AM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> All depends on how "an empty repository" is defined.  My definition of an
> empty repository would have been:
> 
>  - No objects in it;
>  - No index;
>  - No refs except symrefs.

Agreed. In the original message, he used the phrase "no existing commits" which I latched onto (to mean "no existing commits on this branch"). But the subject does say "empty repository". :)

Eric, maybe you can tell us more about what you're trying to accomplish?
-Peff
Previous: Junio C HamanoNext: Eric Gerlach
Message 6 of 8 in “Is "show-ref -h" a good test for an empty repository?”
  1. Eric GerlachSep 6, 2008
  2. Jeff KingSep 6, 2008
  3. Eric GerlachSep 7, 2008
  4. Jeff KingSep 7, 2008
  5. Junio C HamanoSep 7, 2008
  6. Jeff KingSep 7, 2008
  7. Eric GerlachSep 8, 2008
  8. Jeff KingSep 8, 2008

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.