Git development
 help / color / mirror / Atom feed
* commit takes 8 secs; but instant when offline - can I fix this?
@ 2008-11-02 14:08 13ren
  2008-11-02 14:13 ` Thomas Rast
  0 siblings, 1 reply; 4+ messages in thread
From: 13ren @ 2008-11-02 14:08 UTC (permalink / raw)
  To: git


Hi all,

With the network plugged in, git-commit takes 8 seconds.

When I unplug the network, commit is instant...

I confirmed this with a fresh test directory, just adding an extra line to
the file "test" for each commit:

> git init
Initialized empty Git repository in /home/user/gitexpt/.git/
> vi test
> git add *

> date; git commit -a -m "add minor change"; date
Mon Nov  3 00:31:02 EST 2008
Created commit 9b845a2: add minor change
 1 files changed, 2 insertions(+), 0 deletions(-)
Mon Nov  3 00:31:10 EST 2008

> date; git commit -a -m "add test, without network"; date
Mon Nov  3 00:46:00 EST 2008
Created commit dd02a69: add test, without network
 1 files changed, 3 insertions(+), 0 deletions(-)
Mon Nov  3 00:46:00 EST 2008

> git --version
git version 1.5.6.3

Anyone know why is git-commit so slow? Or if there I can anything to change
this?

I'd assumed the slowness was normal, since I'm new to version control. I've
googled and searched mailing lists, but haven't found this. Could be just my
installation (or others make the same assumption?)

Many thanks for any help... I'm going a little crazy here.


-- 
View this message in context: http://n2.nabble.com/commit-takes-8-secs--but-instant-when-offline---can-I-fix-this--tp1445352p1445352.html
Sent from the git mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: commit takes 8 secs; but instant when offline - can I fix this?
  2008-11-02 14:08 commit takes 8 secs; but instant when offline - can I fix this? 13ren
@ 2008-11-02 14:13 ` Thomas Rast
  2008-11-02 16:34   ` Brendan Macmillan
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Rast @ 2008-11-02 14:13 UTC (permalink / raw)
  To: 13ren; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

13ren wrote:
> With the network plugged in, git-commit takes 8 seconds.
> 
> When I unplug the network, commit is instant...

Configure your user.email (and user.name), see man git-config.  If the
email is not set, Git tries to figure out your hostname, which
depending on DNS misconfigurations can apparently cause such delays.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: commit takes 8 secs; but instant when offline - can I fix this?
  2008-11-02 14:13 ` Thomas Rast
@ 2008-11-02 16:34   ` Brendan Macmillan
  2008-11-02 19:18     ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Brendan Macmillan @ 2008-11-02 16:34 UTC (permalink / raw)
  To: Thomas Rast; +Cc: git

Many thanks for the explanation, and it's now instant.

To ~/.gitconfig, I added:

[user]
  email = myemail@address.com


On 03/11/2008, Thomas Rast <trast@student.ethz.ch> wrote:
> 13ren wrote:
>  > With the network plugged in, git-commit takes 8 seconds.
>  >
>  > When I unplug the network, commit is instant...
>
> Configure your user.email (and user.name), see man git-config.  If the
>  email is not set, Git tries to figure out your hostname, which
>  depending on DNS misconfigurations can apparently cause such delays.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: commit takes 8 secs; but instant when offline - can I fix this?
  2008-11-02 16:34   ` Brendan Macmillan
@ 2008-11-02 19:18     ` Linus Torvalds
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2008-11-02 19:18 UTC (permalink / raw)
  To: Brendan Macmillan; +Cc: Thomas Rast, git



On Mon, 3 Nov 2008, Brendan Macmillan wrote:
>
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-02 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 14:08 commit takes 8 secs; but instant when offline - can I fix this? 13ren
2008-11-02 14:13 ` Thomas Rast
2008-11-02 16:34   ` Brendan Macmillan
2008-11-02 19:18     ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox