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

rev-parse --is-bare-repository incorrect when work tree is set

From
SBSam Bazley <sambazley@fastmail.com>
Date
Jun 15, 2019, 01:59 UTC
Message-ID
<8ac7a1d8-9185-b527-67f4-d5e25cb3eaf5@fastmail.com>

rev-parse --is-bare-repository incorrectly outputs "false" when testing a bare repository with the work tree set.

To reproduce:

$ git init --bare testbare $ git --git-dir=testbare rev-parse --is-bare-repository true $ git --git-dir=testbare --work-tree=something rev-parse \ --is-bare-repository false $ GIT_WORK_TREE=something git --git-dir=testbare rev-parse \ --is-bare-repository false

Next: SZEDER Gábor
Message 1 of 2 in “rev-parse --is-bare-repository incorrect when work tree is set”
  1. Sam BazleyJun 15, 2019
  2. SZEDER GáborJun 15, 2019

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.