diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-04-24 17:25:33 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-24 17:25:33 -0700 |
| commit | 36d8035d27d6100a525a0e25619868b9542a4f35 (patch) | |
| tree | c3d53b9740c6936acceb621da9b839389abaf7e5 /git-compat-util.h | |
| parent | Merge branch 'aw/t9811-modernize' (diff) | |
| parent | object-store: merge "object-store-ll.h" and "object-store.h" (diff) | |
| download | git-36d8035d27d6100a525a0e25619868b9542a4f35.tar.gz git-36d8035d27d6100a525a0e25619868b9542a4f35.zip | |
Merge branch 'ps/object-file-cleanup'
Code clean-up.
* ps/object-file-cleanup:
object-store: merge "object-store-ll.h" and "object-store.h"
object-store: remove global array of cached objects
object: split out functions relating to object store subsystem
object-file: drop `index_blob_stream()`
object-file: split up concerns of `HASH_*` flags
object-file: split out functions relating to object store subsystem
object-file: move `xmmap()` into "wrapper.c"
object-file: move `git_open_cloexec()` to "compat/open.c"
object-file: move `safe_create_leading_directories()` into "path.c"
object-file: move `mkdir_in_gitdir()` into "path.c"
Diffstat (limited to 'git-compat-util.h')
| -rw-r--r-- | git-compat-util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index afa040086f..591bb78ad9 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -598,6 +598,9 @@ static inline bool strip_suffix(const char *str, const char *suffix, #define DEFAULT_PACKED_GIT_LIMIT \ ((1024L * 1024L) * (size_t)(sizeof(void*) >= 8 ? (32 * 1024L * 1024L) : 256)) +int git_open_cloexec(const char *name, int flags); +#define git_open(name) git_open_cloexec(name, O_RDONLY) + static inline size_t st_add(size_t a, size_t b) { if (unsigned_add_overflows(a, b)) |
