summaryrefslogtreecommitdiff
path: root/src/stash.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-12-06 13:36:17 -0800
committerRussell Belfer <rb@github.com>2013-01-04 15:47:42 -0800
commitcf208031705388a2d1907fb9ec409ff22179f380 (patch)
tree264c79be7de58b468b02c56979e4c8765556f934 /src/stash.c
parentbfe7d7de226e91c7ed99b68fc447aa0bcd5182ab (diff)
downloadlibgit2-cf208031705388a2d1907fb9ec409ff22179f380.tar.gz
Rework checkout internals (again)
I've tried to map out the detailed behaviors of checkout and make sure that we're handling the various cases correctly, along with providing options to allow us to emulate "git checkout" and "git checkout-index" with the various flags. I've thrown away flags in the checkout API that seemed like clutter and added some new ones. Also, I've converted the conflict callback to a general notification callback so we can emulate "git checkout" output and display "dirty" files. As of this commit, the new behavior is not working 100% but some of that is probably baked into tests that are not testing the right thing. This is a decent snapshot point, I think, along the way to getting the update done.
Diffstat (limited to 'src/stash.c')
-rw-r--r--src/stash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/stash.c b/src/stash.c
index 705fc75ea..0aba4dc85 100644
--- a/src/stash.c
+++ b/src/stash.c
@@ -500,8 +500,7 @@ static int reset_index_and_workdir(
{
git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
- opts.checkout_strategy =
- GIT_CHECKOUT_UPDATE_MODIFIED | GIT_CHECKOUT_UPDATE_UNTRACKED;
+ opts.checkout_strategy = GIT_CHECKOUT_FORCE;
if (remove_untracked)
opts.checkout_strategy |= GIT_CHECKOUT_REMOVE_UNTRACKED;