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

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

From
Garry Dolley <gdolley@arpnetworks.com>
Date
Aug 27, 2008, 22:15 UTC
Message-ID
<20080827221544.GA12459@garry-thinkpad.arpnetworks.com>
In-Reply-To
<48B5C9E4.4030807@lsrfire.ath.cx>
On Wed, Aug 27, 2008 at 11:40:52PM +0200, Ren?? Scharfe wrote:
Show 7 quoted lines
> 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?

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
Previous: René ScharfeNext: Junio C Hamano
Message 5 of 12 in “git-shortlog hangs on bare repo without --bare option”
  1. Garry DolleyAug 27, 2008
  2. Junio C HamanoAug 27, 2008
  3. Garry DolleyAug 27, 2008
  4. René ScharfeAug 27, 2008
  5. Garry DolleyAug 27, 2008
  6. Junio C HamanoAug 27, 2008
  7. Junio C HamanoAug 27, 2008
  8. Junio C HamanoAug 27, 2008
  9. Junio C HamanoAug 27, 2008
  10. Jeff KingAug 27, 2008
  11. Junio C HamanoAug 28, 2008
  12. Nguyen Thai Ngoc DuyAug 28, 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.