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

Re: [PATCH 1/3] git-gui: properly check for a bare repo

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 18, 2009, 21:53 UTC
Message-ID
<20090218215312.GO22848@spearce.org>
In-Reply-To
<cb7bb73a0902181347k6ae479b4v84e2ea8a9f6639dc@mail.gmail.com>
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> wrote:
Show 8 quoted lines
> On Wed, Feb 18, 2009 at 6:16 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
> >
> > This doesn't work as you expect.  Its a chicken-and-egg problem.
> > We haven't read the config yet because we aren't sure that the
> > $_gitdir really is a git directory.  Consequently, core.bare is
> > always false.
> 
> Isn't the config loaded on line 1053?
No, that line is only run if there is no git repository here and
we are opening the repository selection wizard.  The load_config
is to pull in the user's ~/.gitconfig.
 
> Better ways to work around the issue?

Break down and run the fork command here. We already ran two git-rev-parse calls at 1049,1050. One more here during startup isn't going to kill the world.

The only problem is, you need to watch out for the git version. AFAIK git-gui still runs on git 1.5.0. Any option added since should be used only if its known to exist, or if there is a fallback that works almost as good.

Or, we need to up our minimum version around line 842, and in the messages above in 756, 787, 789, 791, and their translations...

-- 
Shawn.
Previous: Giuseppe BilottaNext: Giuseppe Bilotta
Message 5 of 9 in “git-gui: generic and robust worktree/gitdir support”
  1. 0/3 git-gui: generic and robust worktree/gitdir supportGiuseppe Bilotta, Feb 9, 2009
  2. 1/3 git-gui: properly check for a bare repoGiuseppe Bilotta, Feb 9, 2009
  3. Shawn O. PearceFeb 18, 2009
  4. Giuseppe BilottaFeb 18, 2009
  5. Shawn O. PearceFeb 18, 2009
  6. 2/3 git-gui: use the actual worktreeGiuseppe Bilotta, Feb 9, 2009
  7. Shawn O. PearceFeb 18, 2009
  8. 3/3 git-gui: define correct GIT_DIR for gitkGiuseppe Bilotta, Feb 9, 2009
  9. Shawn O. PearceFeb 18, 2009

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.