hbons/SparkleShare — Issue #595: index.lock on Windows Causes Loop
Author: rriley
Created: 2012-03-01 09:40:57+00:00
State: open

I had this problem on my own compile of the Windows port, I don't if it exists on others.

SparkleShare crashed on my machine, but left a rogue git and ssh-agent process running. I couldn't restart SparkleShare until I killed them, so I used task manager to kill them both. Upon restarting Sparkleshare, nothing would sync and my log file was full of things like:
12:35:50 [Commit][workshared]
12:35:50 [Cmd] git rebase -v FETCH_HEAD
12:35:51 [Git][workshared] Conflict detected. Trying to get out...
12:35:51 [Cmd] git status --porcelain
12:35:51 [Cmd] git status --porcelain
12:35:52 [Git][workshared] Conflict type: M test.txt

Repeated over and over again. After some digging, it appears that when I killed git manually it left a stale index.lock file in my repo's .git/ directory. This makes git rebase think there are uncommitted changes when there aren't, and SparkleShare goes into a loop of trying to rebase, trying to commit, trying to push, trying to getch, trying to rebase, etc.