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

Re: [PATCH] Stop telling users we are 'defaulting to local storage area'.

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 15, 2006, 14:10 UTC
Message-ID
<elua7a$v7q$1@sea.gmane.org>
In-Reply-To
<20061214230902.GA26506@spearce.org>
Shawn O. Pearce wrote:
Show 12 quoted lines
> Back in the old days of Git when people messed around with their
> GIT_DIR environment variable more often it was nice to know whether
> or not git-init-db created a .git directory or used GIT_DIR.
> 
> But now that we are making excuses in the documentation about why
> this message gets printed by git-init-db we should just remove it
> entirely.  It doesn't really help the user to understand what just
> happened.  It also breaks from our normal behavior of not printing
> anything if the command was successful.
> 
> Suggested by Andy Parkins in his Git 'niggles' list
> (<200612132237.10051.andyparkins@gmail.com>).
Perhaps we should print something _if_ GIT_DIR is set, then?
Show 10 quoted lines
>        * Set up the default .git directory contents
>        */
>       git_dir = getenv(GIT_DIR_ENVIRONMENT);
> -     if (!git_dir) {
> +     if (!git_dir)
>               git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
> -             fprintf(stderr, "defaulting to local storage area\n");
> -     }
>       safe_create_dir(git_dir, 0);
>  
I'd rather leave block, even if it consist now of single statement.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: David Lang
Message 5 of 5 in “Stop telling users we are 'defaulting to local storage area'.”
  1. Stop telling users we are 'defaulting to local storage area'.Shawn O. Pearce, Dec 14, 2006
  2. Nicolas PitreDec 15, 2006
  3. Shawn PearceDec 15, 2006
  4. David LangDec 19, 2006
  5. Jakub NarebskiDec 15, 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.