summaryrefslogtreecommitdiff
path: root/include/git2/common.h
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2017-01-14 18:39:32 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2017-04-03 23:13:00 +0100
commitd5e6ca1e4a3f21ef9eb94c9e74cc4afb77194751 (patch)
tree4b9667e649644089c5107d957603da6e4e2b9bb7 /include/git2/common.h
parent92d5a6377ad4d77bc51bb596ff7c78e9bcd0f902 (diff)
downloadlibgit2-d5e6ca1e4a3f21ef9eb94c9e74cc4afb77194751.tar.gz
Allow to configure default file share mode for opening files
This can prevent FILE_SHARED_VIOLATIONS when used in tools such as TortoiseGit TGitCache and FILE_SHARE_DELETE, because files can be opened w/o being locked any more. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'include/git2/common.h')
-rw-r--r--include/git2/common.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index c909f86ca..6d2092028 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -180,6 +180,8 @@ typedef enum {
GIT_OPT_GET_USER_AGENT,
GIT_OPT_ENABLE_OFS_DELTA,
GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION,
+ GIT_OPT_GET_WINDOWS_SHAREMODE,
+ GIT_OPT_SET_WINDOWS_SHAREMODE,
} git_libgit2_opt_t;
/**
@@ -284,6 +286,17 @@ typedef enum {
* > - `user_agent` is the value that will be delivered as the
* > User-Agent header on HTTP requests.
*
+ * * opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)
+ *
+ * > Set the share mode used when opening files on Windows.
+ * > For more information, see the documentation for CreateFile.
+ * > The default is: FILE_SHARE_READ | FILE_SHARE_WRITE. This is
+ * > ignored and unused on non-Windows platforms.
+ *
+ * * opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)
+ *
+ * > Get the share mode used when opening files on Windows.
+ *
* * opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)
*
* > Enable strict input validation when creating new objects