Skip to content

sparse-checkout: correct behavior on dirty status #234

Description

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions