diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2021-12-23 22:29:50 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-23 23:28:36 +0300 |
commit | cd1799dea097cee064db1d09966fee88078476e9 (patch) | |
tree | cd1f59e01c8861d873d7546aaef65ce5154b0f89 /reftable/reftable-writer.h | |
parent | 0dd44584abf3fee0ba19b5edf856be2a79974228 (diff) |
reftable: support preset file mode for writing
Create files with mode 0666, so umask works as intended. Provides an override,
which is useful to support shared repos (test t1301-shared-repo.sh).
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/reftable-writer.h')
-rw-r--r-- | reftable/reftable-writer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/reftable/reftable-writer.h b/reftable/reftable-writer.h index af36462ced..a560dc1725 100644 --- a/reftable/reftable-writer.h +++ b/reftable/reftable-writer.h @@ -35,6 +35,9 @@ struct reftable_write_options { */ uint32_t hash_id; + /* Default mode for creating files. If unset, use 0666 (+umask) */ + unsigned int default_permissions; + /* boolean: do not check ref names for validity or dir/file conflicts. */ unsigned skip_name_check : 1; |