summaryrefslogtreecommitdiff
path: root/include/git2/checkout.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2015-01-14 18:47:00 -0500
committerEdward Thomson <ethomson@microsoft.com>2015-01-20 17:13:31 -0600
commite74340b0001247681bf0fe43f73622e87b52ccae (patch)
tree1e00d71efa79ac71a43851314475e27ac33c737b /include/git2/checkout.h
parentc2dee0fcb0d247ecb3a48709ae1c57d1b935d2ae (diff)
downloadlibgit2-e74340b0001247681bf0fe43f73622e87b52ccae.tar.gz
checkout: remove files before writing new ones
On case insensitive filesystems, we may have files in the working directory that case fold to a name we want to write. Remove those files (by default) so that we will not end up with a filename that has the unexpected case.
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r--include/git2/checkout.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h
index ffbb53fc5..8314c623d 100644
--- a/include/git2/checkout.h
+++ b/include/git2/checkout.h
@@ -104,6 +104,11 @@ GIT_BEGIN_DECL
* overwritten. Normally, files that are ignored in the working directory
* are not considered "precious" and may be overwritten if the checkout
* target contains that file.
+ *
+ * - GIT_CHECKOUT_DONT_REMOVE_EXISTING prevents checkout from removing
+ * files or folders that fold to the same name on case insensitive
+ * filesystems. This can cause files to retain their existing names
+ * and write through existing symbolic links.
*/
typedef enum {
GIT_CHECKOUT_NONE = 0, /**< default is a dry run, no actual updates */
@@ -158,6 +163,9 @@ typedef enum {
/** Include common ancestor data in diff3 format files for conflicts */
GIT_CHECKOUT_CONFLICT_STYLE_DIFF3 = (1u << 21),
+ /** Don't overwrite existing files or folders */
+ GIT_CHECKOUT_DONT_REMOVE_EXISTING = (1u << 22),
+
/**
* THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED
*/