Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Never lock the index #1238

Merged
merged 9 commits into from
Oct 31, 2017
Merged

Conversation

BinaryMuse
Copy link
Contributor

git/git@27344d6 has finally landed in Git 2.15.0 and in Dugite 1.49.0! This updates dependencies as appropriate, utilizes the new option via the GIT_OPTIONAL_LOCKS environment variable, and removes DeferredCallbackQueue (as it was introduced to help alleviate index lock contention in #726).

I verified this on my own computer using this test plan:

  1. Open a project in Atom with atom -d .
  2. Set Atom as my commit editor with export EDITOR="atom -d --wait"
  3. Begin an interactive rebase with git rebase -i head~5
  4. In the Atom window that opens, change the first and third item to r to rewrite the commit message.
  5. Save and close the window.
  6. In the window that next opens (to allow editing the commit), change the commit text, save, and close the window.

Prior to this PR, the rebase would immediately stop, because the window opened in step 1 would receive focus and run status, locking the index. After this PR, I was able to edit multiple commit messages with no problems. 🎉

Fixes #961
Fixes akonwi/git-plus#693
Ref platformio/platformio-atom-ide-terminal#297 (may fix some reported issues)

@BinaryMuse BinaryMuse requested a review from kuychaco October 30, 2017 23:35
Copy link
Contributor

@kuychaco kuychaco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! So nice seeing this complexity ripped out! 💥

I think it'd be worth trying to add a test case for this if it's not too much of a hassle.

@BinaryMuse
Copy link
Contributor Author

Well, I was able to design a test that failed on my machine with the env var unset, but it caused a lot of issues on CI so I've decided to remove it — this is not likely to regress.

@BinaryMuse BinaryMuse merged commit f11cb4c into master Oct 31, 2017
@BinaryMuse BinaryMuse deleted the mkt-if-the-repos-rockin-dont-come-a-lockin branch October 31, 2017 22:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent index.lock File exists errors Disable locking (observe only by default)
2 participants