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

Re: [PATCH] More readable 'Not a git repository' messages

From
JJJoshua Juran <jjuran@gmail.com>
Date
Aug 10, 2010, 22:34 UTC
Message-ID
<D944E855-0ECF-41AF-ACD4-8ED8EABCBC1D@gmail.com>
In-Reply-To
<20100810155240.GA5116@localhost.localdomain>
On Aug 10, 2010, at 8:52 AM, Jared Hance wrote:
Show 21 quoted lines
> On Mon, Aug 09, 2010 at 07:24:35PM +0200, Ralf Ebert wrote:
>> old: Not a git repository (or any of the parent directories): .git
>> new: Not in a git repository: /home/bob/somefolder
>
> Don't we lose information here? Perhaps print the value of
> DEFAULT_GIT_DIR_ENVIRONMENT.
>
>> old: Not a git repository (or any parent up to mount parent /home/ 
>> bob)
>> old: Stopping at filesystem boundary
>> (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
>> new: Not in a git repository: /home/bob/somefolder
>> new: (stopped searching at /home because
>> GIT_DISCOVERY_ACROSS_FILESYSTEM is not set)
>
> This certainly looks good, but some people might not realize /home is
> a filesystem boundary (perhaps those who had someone else set up their
> system and don't know their partition setup. I suggest:
>
> (stopped searching at the filesystem boundary, /home, because
> GIT_DISCOVERY_ACROSS_FILESYSTEM is not set)

If the search for .git stops at /home or $HOME, why not say nothing at all? If you've turned /home (or /) into a Git repo, then either you know what you're doing or you deserve as much pain as possible. (I haven't decided which.)

Josh
Previous: Jared HanceNext: Ralf Ebert
Message 9 of 13 in “More readable 'Not a git repository' messages”
  1. More readable 'Not a git repository' messagesRalf Ebert, Aug 9, 2010
  2. Nguyen Thai Ngoc DuyAug 9, 2010
  3. Ralf EbertAug 9, 2010
  4. Jonathan NiederAug 9, 2010
  5. Ralf EbertAug 9, 2010
  6. Nguyen Thai Ngoc DuyAug 10, 2010
  7. Sverre RabbelierAug 10, 2010
  8. Jared HanceAug 10, 2010
  9. Joshua JuranAug 10, 2010
  10. More readable 'Not a git repository' messagesRalf Ebert, Aug 13, 2010
  11. Joshua JuranAug 13, 2010
  12. setup.c: Improve 'Not a git repository' messagesRalf Ebert, Aug 15, 2010
  13. Jonathan NiederAug 15, 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.