summaryrefslogtreecommitdiff
path: root/include/git2/odb_backend.h
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-11-04 12:16:14 -0800
committerVicent Martí <vicent@github.com>2013-11-04 12:16:14 -0800
commit0e1115d2872fcb8f13fd28a52f1f14d52792623e (patch)
treeda6478448bf9eae826f2b83236ee169c606884f1 /include/git2/odb_backend.h
parentfb6b0e019e30a2f9b653e5b1e6b8d5fc1105aee7 (diff)
parentdd64c71c2685d0b72b6f58149ecf2a972a6ea98b (diff)
downloadlibgit2-0e1115d2872fcb8f13fd28a52f1f14d52792623e.tar.gz
Merge pull request #1939 from ethomson/readwrite_odb
Allow backend consumers to specify file mode
Diffstat (limited to 'include/git2/odb_backend.h')
-rw-r--r--include/git2/odb_backend.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index 1b3e2fd12..d3dd733a8 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -40,10 +40,18 @@ GIT_EXTERN(int) git_odb_backend_pack(git_odb_backend **out, const char *objects_
* @param objects_dir the Git repository's objects directory
* @param compression_level zlib compression level to use
* @param do_fsync whether to do an fsync() after writing (currently ignored)
+ * @param dir_mode permissions to use creating a directory or 0 for defaults
+ * @param file_mode permissions to use creating a file or 0 for defaults
*
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_odb_backend_loose(git_odb_backend **out, const char *objects_dir, int compression_level, int do_fsync);
+GIT_EXTERN(int) git_odb_backend_loose(
+ git_odb_backend **out,
+ const char *objects_dir,
+ int compression_level,
+ int do_fsync,
+ mode_t dir_mode,
+ mode_t file_mode);
/**
* Create a backend out of a single packfile