Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sparse-checkout: correct behavior on dirty status #234

Closed
derrickstolee opened this issue Dec 30, 2019 · 1 comment · Fixed by #267
Closed

sparse-checkout: correct behavior on dirty status #234

derrickstolee opened this issue Dec 30, 2019 · 1 comment · Fixed by #267

Comments

@derrickstolee
Copy link
Collaborator

When running git sparse-checkout set with a dirty status, we have the following behavior:

  1. Upstream: do not run. Clean status is required.
  2. Here: Run, but possibly overwrite staged changes.

We need to allow the command to run with a dirty status, but to do the following:

  • Do not run if there is a dirty status outside of the intersection of the old cone and the new cone. (i.e. if something would change skip-worktree bits but has dirty status, THEN complain)
  • If there is a dirty status inside the intersection of the two cones, then preserve the index state.
@derrickstolee
Copy link
Collaborator Author

This is being completed upstream. See git#724 for more. Also #252 includes some stuff around this.

derrickstolee added a commit that referenced this issue May 14, 2020
These commits are in `next` and are valuable to us. In particular, it does the right thing when presented with a dirty status.

Resolves #234.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant