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

Re: [PATCH] Fix git_setup_directory_gently when GIT_DIR is set

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 6, 2006, 05:39 UTC
Message-ID
<Pine.LNX.4.63.0606060735400.29431@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vmzcr14ao.fsf@assigned-by-dhcp.cox.net>
Hi,
On Mon, 5 Jun 2006, Junio C Hamano wrote:
Show 10 quoted lines
> Junio C Hamano <junkio@cox.net> writes:
> 
> > I know clone currently relies on init-db to create the directory if
> > it does not exist (I wrote the code after all).
> 
> Ah, I think I see the real problem is.  Alias handling is done
> too early, and for commands like init-db that does _not_ even
> want to look at an existing repository it tries to use GIT_DIR.
> 
> So how about this patch instead on top of yours?

Yes, I like it. I was so focused on reading the config early to be done with it, and avoiding reading the config twice (which it can do now, with your patch, but only if one is so insane to use nested aliases).

Your method of avoiding shadowing proper git commands is elegant, if maybe incomplete: you have no way of warning the user that the alias is not used. But then, I do not think that matters.

Ciao, Dscho

Previous: Junio C Hamano
Message 8 of 8 in “Fix git_setup_directory_gently when GIT_DIR is set”
  1. Fix git_setup_directory_gently when GIT_DIR is setJohannes Schindelin, Jun 5, 2006
  2. Junio C HamanoJun 5, 2006
  3. Johannes SchindelinJun 5, 2006
  4. Junio C HamanoJun 5, 2006
  5. Johannes SchindelinJun 5, 2006
  6. Junio C HamanoJun 5, 2006
  7. Junio C HamanoJun 6, 2006
  8. Johannes SchindelinJun 6, 2006

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.