git alias partially stopped working in certain repositories, exception 80000001

1

This morning I've noted that a few git alias stopped working. I've used these extensivly every day since ~2 years back, most notably (from ~/.gitconfig):

[alias]
    start = checkout -b
    m = checkout origin/master
    s = status
    st = diff --staged
    co = checkout
    cm = commit
    cp = cherry-pick
    amen = commit --amend --no-edit
    word = commit --amend
    last = whatchanged -1

For instance

  • git s does nothing (that I can see) while git status works as normal.
  • git co will produce a .git/index.lock and then nothing else. Tab completion works as usual.

Interestingly this only affected a few git repositories (2 out of 5 that I've tested). I've tried cloning an affected repository and got the same result.

I run windows cygwin 64 bit, git 2.8.3. A collegue the same git had exactly the same issue, another had no problem (mac git 2.7.4).

I tried out strace git co master and found something that might be interesting:

12  164720 [main] git-checkout 10092 open: 3 = open(.../.git/index.lock, 0x8A02)
15  164735 [main] git-checkout 10092 getpid: 10092 = getpid()
50  164785 [main] git-checkout 10092 sigprocmask: 0 = sigprocmask (0, 0x0, 0x6000D1F90)
--- Process 10980 thread 1156 created
--- Process 10980, exception 80000001 at 00007FFC66167BF4
--- Process 10980 thread 1156 exited with status 0x80000001
--- Process 10980 thread 10968 exited with status 0x80000001
--- Process 10980 thread 5184 exited with status 0x80000001
--- Process 10980 thread 11176 exited with status 0x80000001
--- Process 10980 exited with status 0x80000001

I also see exception 80000001 in strace git s output so I'm guessing there is a connection.

Compared to strace git checkout master

12  201575 [main] git 2480 open: 3 = open(.../.git/index.lock, 0x8A02)
15  201590 [main] git 2480 getpid: 2480 = getpid()
53  201643 [main] git 2480 sigprocmask: 0 = sigprocmask (0, 0x0, 0x6000E4790)
--- Process 2480 thread 10544 created
608  202251 [main] git 2480 sigprocmask: 0 = sigprocmask (0, 0x0, 0x6000E4890)
78  202329 [unknown (0x2930)] git 2480 pthread::thread_init_wrapper: tid 0xFFDFCE00

I've also tried

  • Rebooting
  • Reinstalling git
  • Downgrading git
  • Installing 32 bit cygwin
  • Cloning the affected repository, both locally and from server
  • git gc

I've also tested GIT_TRACE=$HOME/trace-co.log git co master which renders:

$ cat ~/trace-co.log
15:29:22.828814 git.c:563               trace: exec: 'git-co' 'master'
15:29:22.833672 run-command.c:336       trace: run_command: 'git-co' 'master'
15:29:22.909776 git.c:286               trace: alias expansion: co => 'checkout'
15:29:22.910082 git.c:563               trace: exec: 'git-checkout' 'master'
15:29:22.910101 run-command.c:336       trace: run_command: 'git-checkout' 'master'
15:29:23.060794 git.c:350               trace: built-in: git 'checkout' 'master'

This looks exactly the same in a corrupt and working repository. For checkout I get:

$ cat ~/trace-checkout.log
14:51:48.605505 git.c:350               trace: built-in: git 'checkout' 'master'

No the question is, how do I fix this?

git
cygwin
alias
asked on Stack Overflow Sep 13, 2016 by Love • edited Sep 14, 2016 by Love

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0