git-shortlog hangs on bare repo without --bare option

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

git-shortlog hangs on bare repo without --bare option

From: Garry Dolley <hidden>
Date: 2016-06-15 22:45:14

I didn't see this happen with git 1.5.x, but if you do git-shortlog on a bare 
repo, without specifying --bare, the command will seemingly hang indefinitely.

Here's my output:

[garry@garry-thinkpad] ~/dev (master) $ cd ebay4r/                       <----- Repo with working tree (non-bare)
[garry@garry-thinkpad] ~/dev/ebay4r (master) $ git shortlog -e -s
   130  Garry Dolley [off-list ref]
[garry@garry-thinkpad] ~/dev/ebay4r (master) $ cd ..
[garry@garry-thinkpad] ~/dev (master) $ git clone --mirror ebay4r/ ebay4r-bare
Initialized empty Git repository in /home/garry/dev/ebay4r-bare/
[garry@garry-thinkpad] ~/dev (master) $ cd ebay4r-bare/
[garry@garry-thinkpad] ~/dev/ebay4r-bare (master) $ git shortlog -e -s
<hang>                                                                   <----- *** It hangs here ***

[garry@garry-thinkpad] ~/dev/ebay4r-bare (master) $ git --bare shortlog -e -s
   130  Garry Dolley [off-list ref]
[garry@garry-thinkpad] ~/dev/ebay4r-bare (master) $ 


If newlines break this output in your reader, you can also view it 
here: http://pastie.org/261134

I'm using git 1.6.0.1

Is this a bug?

-- 
Garry Dolley
ARP Networks, Inc.
818-206-0181
Los Angeles County REACT, Unit 336
WQGK336

Re: git-shortlog hangs on bare repo without --bare option

From: René Scharfe <hidden>
Date: 2016-06-15 22:45:14

Garry Dolley schrieb:
I didn't see this happen with git 1.5.x, but if you do git-shortlog on a bare 
repo, without specifying --bare, the command will seemingly hang indefinitely.
FWIW, I tried git 1.5.0 and it hangs, too.  Which exact version did work
for you?  Could you, based on it, bisect the commit that introduced this
behaviour?

As a workaround, you can use "git log | git shortlog".

René

Re: git-shortlog hangs on bare repo without --bare option

From: Garry Dolley <hidden>
Date: 2016-06-15 22:45:14

On Wed, Aug 27, 2008 at 11:40:52PM +0200, Ren?? Scharfe wrote:
Garry Dolley schrieb:
quoted
I didn't see this happen with git 1.5.x, but if you do git-shortlog on a bare 
repo, without specifying --bare, the command will seemingly hang indefinitely.
FWIW, I tried git 1.5.0 and it hangs, too.  Which exact version did work
for you?  Could you, based on it, bisect the commit that introduced this
behaviour?
I just tried it with 1.5.6.2, and it hung.  Unfortunately, I had
several versions of git inside my ~/src as I upgraded over the
months, and just last week I decided to blow away the old ones, so I
don't know what version it was that I saw this work. :(

Either way, it's too big a deal, I just wanted to point out what I
saw.

If it helps, this is the last few lines of strace before it hangs:

stat(".git", 0x7fff6e44dd90)            = -1 ENOENT (No such file or directory)
open(".git/config", O_RDONLY)           = -1 ENOENT (No such file or directory)
pipe([3, 4])                            = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f7a6642d790) = 12674
dup2(3, 0)                              = 0
close(3)                                = 0
close(4)                                = 0
select(1, [0], NULL, [0], NULL

So looks like it is waiting to be fed some input?  It's hungry :)
As a workaround, you can use "git log | git shortlog".
Also, 'git --bare shortlog' works too.

-- 
Garry Dolley
http://scie.nti.st
ARP Networks, Inc.
818-206-0181
Los Angeles County REACT, Unit 336
WQGK336
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help