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

Re: commit takes 8 secs; but instant when offline - can I fix this?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Nov 2, 2008, 19:18 UTC
Message-ID
<alpine.LFD.2.00.0811021115030.3483@nehalem.linux-foundation.org>
In-Reply-To
<7d856ea50811020834n3a252ae2r21d36b24c10eebbf@mail.gmail.com>
On Mon, 3 Nov 2008, Brendan Macmillan wrote:
Show 7 quoted lines
>
> Many thanks for the explanation, and it's now instant.
> 
> To ~/.gitconfig, I added:
> 
> [user]
>   email = myemail@address.com

I'd like to point out that in addition to making git not try to figure out your hostname, you may well want to try to fix your setup so that it doesn't take that long in the first place.

In fact, you might use "git commit" (or "git var -l" which probably shows the same 8-second thing more easily without needing anything else) as a way to debug what it is that takes too long.

Because even though adding your email to yout .gitconfig file is the right solution _anyway_ (because the git guess is rather more flaky than you just telling it what host to use), I bet there are other programs that will have the same 8-second delay, and you are better off trying to just fix your DNS problem.

			Linus
Previous: Brendan Macmillan
Message 4 of 4 in “commit takes 8 secs; but instant when offline - can I fix this?”
  1. 13renNov 2, 2008
  2. Thomas RastNov 2, 2008
  3. Brendan MacmillanNov 2, 2008
  4. Linus TorvaldsNov 2, 2008

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.