Skip to content

Add checkout --unstaged flag - #1262

Merged
ttaylorr merged 1 commit into
git-lfs:masterfrom
orivej:checkout-unstaged
Jun 28, 2016
Merged

ttaylorr merged 1 commit into
git-lfs:masterfrom
orivej:checkout-unstaged

Conversation

@orivej

@orivej orivej commented May 30, 2016

Copy link
Copy Markdown
Contributor

This change introduces --unstaged ('-u') flag to the checkout subcommand. Originally it is intended to skip the costly git update-index call in the continuous integration setup where git lfs checkout is the last git operation performed in the clone, and the state of the index does not matter anymore.

@orivej

orivej commented May 30, 2016

Copy link
Copy Markdown
Contributor Author

This change could potentially be more useful if it left oids intact, so that git reset --hard after git lfs checkout -u would revert it, rather than update the index.

@orivej
orivej force-pushed the checkout-unstaged branch from b22de69 to ef8c178 Compare May 30, 2016 01:01
@technoweenie

Copy link
Copy Markdown
Contributor

Nice 👍 What do you think about adding this to git lfs pull too, which is essentially git lfs fetch + git lfs checkout right after it?

@ttaylorr

Copy link
Copy Markdown
Contributor

👋 This looks great, thanks @orivej. I'm happy to merge this as-is. If you'd like to add the --unstaged flag to git fls pull, that'd be great too, but not necessary. We can just merge this PR for now, and then come back to the pull command in a future revision.

Let me know what works for you! Thanks again.

@orivej

orivej commented Jun 23, 2016

Copy link
Copy Markdown
Contributor Author

I'm going to rebase this pull request onto the master, and also add the flag to the pull command.

@ttaylorr
ttaylorr merged commit 0532029 into git-lfs:master Jun 28, 2016
@sinbad

sinbad commented Jul 5, 2016

Copy link
Copy Markdown
Contributor

I've proposed reverting this for a couple of reasons discussed in #1352 - I think it should be resubmitted in another form.

@arikon

arikon commented Jul 22, 2016

Copy link
Copy Markdown

@orivej Did you have time to do it?

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.

5 participants