Skip to content

Revert "Add checkout --unstaged flag" - #1352

Merged
sinbad merged 1 commit into
masterfrom
revert-1262-checkout-unstaged
Jul 5, 2016
Merged

sinbad merged 1 commit into
masterfrom
revert-1262-checkout-unstaged

Conversation

@sinbad

@sinbad sinbad commented Jul 5, 2016 •

Copy link
Copy Markdown
Contributor

Fixes #1334
Reverts #1262

Reverting for possible re-submission later. The reasons are:

  1. Failures in the test are causing other subsequent PRs to fail. The reason is that skipping the update-index is unreliable at creating a clean git state, because the index cache may be out of date if the timestamp of files changes during checkout. Depending on the exact timing, the version of git, and the file system, precision issues can result in a non-clean status without update-index.
  2. I think the flag --unstaged is misleading and the documentation "Do not add files to the index, keeping them unstaged." is incorrect. checkout never added anything to the index, it only made sure the index cache was not out of date.

If the intention is to save the expense of calling update-index then perhaps this feature can come back later in the form of a --no-update-index flag or something, with a more accurate description of what it does; including mentioning that although it's faster, it might prevent the state returning to clean correctly in some cases.

@technoweenie

Copy link
Copy Markdown
Contributor

👍 Thanks for clarifying what update-index is doing.

@ttaylorr

ttaylorr commented Jul 5, 2016

Copy link
Copy Markdown
Contributor

Works for me, thanks for the explanation 👍

@ttaylorr

ttaylorr commented Jul 5, 2016

Copy link
Copy Markdown
Contributor

Tracking: #1334

@sinbad
sinbad merged commit b44c9f3 into master Jul 5, 2016
@sinbad
sinbad deleted the revert-1262-checkout-unstaged branch July 5, 2016 16:33
@arikon

arikon commented Jul 6, 2016

Copy link
Copy Markdown

@orivej Could you resubmit #1262 in another form, please?

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 this pull request may close these issues.

4 participants