Skip to content

we don't need getStatus to always lock the index - #5376

Merged
iAmWillShepherd merged 2 commits into
masterfrom
no-locks-for-status
Sep 5, 2018
Merged

iAmWillShepherd merged 2 commits into
masterfrom
no-locks-for-status

Conversation

@shiftkey

@shiftkey shiftkey commented Aug 10, 2018 •

Copy link
Copy Markdown
Member

From the docs for git status:

BACKGROUND REFRESH
------------------

By default, `git status` will automatically refresh the index, updating
the cached stat information from the working tree and writing out the
result. Writing out the updated index is an optimization that isn't
strictly necessary (`status` computes the values for itself, but writing
them out is just to save subsequent programs from repeating our
computation). When `status` is run in the background, the lock held
during the write may conflict with other simultaneous processes, causing
them to fail. Scripts running `status` in the background should consider
using `git --no-optional-locks status` (see linkgit:git[1] for details).

We should totally do this, particularly as:

I'd love to give this time to test thoroughly (as git status is very important to Desktop) to ensure it doesn't affect existing functionality too

@shiftkey shiftkey added this to the 1.3.4 milestone Aug 13, 2018
@hubot
hubot deployed to test August 14, 2018 13:47 Active
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 26, 2018
@shiftkey
shiftkey force-pushed the no-locks-for-status branch from d5a664f to f0d173a Compare August 27, 2018 14:40
@shiftkey

Copy link
Copy Markdown
Member Author

Rather than doing a lot of QA up front on this, I've moved it behind a feature flag that will be enabled for our beta users. This will help us confirm it reduces/removes the amount of "A lock file already exists" errors encountered in the wild before we roll this out to everyone.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

👋 just dropping in to tag #5433 as a related issue.

@iAmWillShepherd iAmWillShepherd self-assigned this Aug 27, 2018

@outofambit outofambit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📲

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants