Mitchel Humpherys writes: > On Fri, Sep 25 2015 at 03:45:56 PM, Ben Gamari wrote: >> Arguably `git rebase` should be holding the `index.lock` for the entire >> duration of the process (or be more resilient to the lock being taken) >> but sadly this isn't the case. Emacs should behave appropriately to >> accomodate this behavior. > > I don't think this is quite right. As I understand it, git only takes > index.lock for operations that mutate the index [1]. > > It wouldn't make sense for git to hold index.lock for the entirety of > the rebase operation since you can stop in the middle of an interactive > rebase and do anything you want (mess with the index, add new commits, > anything). > Ahh, yes. You are quite right. > I think the real question is: why is vc-find-file-hook (or > vc-refresh-state) trying to mutate the index? Shouldn't refreshing a > buffer be a read-only operation (at least with respect to the VCS)? > As far as I can tell vc-find-file-hook is merely calling `git ls-files -c -z -- $FILE`, which sounds to me like it should indeed be a read-only operation. Cheers, - Ben