summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-01-10 15:15:37 -0800
committerRussell Belfer <rb@github.com>2013-01-10 15:15:37 -0800
commit40342bd2b654bed4a49fe84de36e19ba0fefb8b6 (patch)
treee27a4fea5b34bae98b558526297232c58eebd0e4 /include/git2/checkout.h
parent404880b1bac746f15ca73bb57a5c034df6c6b630 (diff)
downloadlibgit2-40342bd2b654bed4a49fe84de36e19ba0fefb8b6.tar.gz
Add GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
This adds an option to checkout a la the diff option to turn off fnmatch evaluation for pathspec entries. This can be useful to make sure your "pattern" in really interpretted as an exact file match only.
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r--include/git2/checkout.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index dfc7e0580..d3e971b43 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -131,6 +131,9 @@ typedef enum {
/** Don't refresh index/config/etc before doing checkout */
GIT_CHECKOUT_NO_REFRESH = (1u << 9),
+ /** Treat pathspec as simple list of exact match file paths */
+ GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH = (1u << 13),
+
/**
* THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED
*/
@@ -222,7 +225,8 @@ typedef struct git_checkout_opts {
void *progress_payload;
/** When not zeroed out, array of fnmatch patterns specifying which
- * paths should be taken into account, otherwise all files.
+ * paths should be taken into account, otherwise all files. Use
+ * GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as simple list.
*/
git_strarray paths;