summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-12-18 15:19:24 -0800
committerRussell Belfer <rb@github.com>2013-01-04 15:47:42 -0800
commit5cf9875a4f6ee6fa26f5617aca8433dd49c72751 (patch)
tree95f749b7d3e7eeb546148d21458ebfa33248c3dc /include/git2
parent7e5c8a5b41ca660def7de23fd32b942878a6ee24 (diff)
downloadlibgit2-5cf9875a4f6ee6fa26f5617aca8433dd49c72751.tar.gz
Add index updating to checkout
Make checkout update entries in the index for all files that are updated and/or removed, unless flag GIT_CHECKOUT_DONT_UPDATE_INDEX is given. To do this, iterators were extended to allow a little more introspection into the index being iterated over, etc.
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/checkout.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index 196962bb9..884ea27f6 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -140,8 +140,11 @@ typedef enum {
/** Only update existing files, don't create new ones */
GIT_CHECKOUT_UPDATE_ONLY = (1u << 7),
+ /** Normally checkout updates index entries as it goes; this stops that */
+ GIT_CHECKOUT_DONT_UPDATE_INDEX = (1u << 8),
+
/** Don't refresh index/config/etc before doing checkout */
- GIT_CHECKOUT_NO_REFRESH = (1u << 8),
+ GIT_CHECKOUT_NO_REFRESH = (1u << 9),
/**
* THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED