diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-26 01:06:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-26 01:06:57 +0200 |
commit | 2c428e4205a50cee19669d5b73cc149ec2254a5d (patch) | |
tree | 1ddebbe9faa0a315a16a923920b6378bdc921479 /object-store.h | |
parent | Merge branch 'rs/add-dry-run-without-objects' (diff) | |
parent | commit: fix duplication regression in permission error output (diff) | |
download | git-2c428e4205a50cee19669d5b73cc149ec2254a5d.tar.xz git-2c428e4205a50cee19669d5b73cc149ec2254a5d.zip |
Merge branch 'ab/fix-commit-error-message-upon-unwritable-object-store'
"git commit" gave duplicated error message when the object store
was unwritable, which has been corrected.
* ab/fix-commit-error-message-upon-unwritable-object-store:
commit: fix duplication regression in permission error output
unwritable tests: assert exact error output
Diffstat (limited to 'object-store.h')
-rw-r--r-- | object-store.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/object-store.h b/object-store.h index 07387dc48f..952efb6a4b 100644 --- a/object-store.h +++ b/object-store.h @@ -223,8 +223,14 @@ int hash_object_file(const struct git_hash_algo *algo, const void *buf, unsigned long len, const char *type, struct object_id *oid); -int write_object_file(const void *buf, unsigned long len, - const char *type, struct object_id *oid); +int write_object_file_flags(const void *buf, unsigned long len, + const char *type, struct object_id *oid, + unsigned flags); +static inline int write_object_file(const void *buf, unsigned long len, + const char *type, struct object_id *oid) +{ + return write_object_file_flags(buf, len, type, oid, 0); +} int hash_object_file_literally(const void *buf, unsigned long len, const char *type, struct object_id *oid, |