summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-11-25 08:34:42 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-26 00:39:38 +0100
commit0f5762b0435234c4dc916f4b3672c78c1b24f0e2 (patch)
tree12158524ce2f20cc72b576ca4d17352c7102a19c
parentreftable/block: optimize allocations by using scratch buffer (diff)
downloadgit-0f5762b0435234c4dc916f4b3672c78c1b24f0e2.tar.xz
git-0f5762b0435234c4dc916f4b3672c78c1b24f0e2.zip
refs: adapt `initial_transaction` flag to be unsigned
The `initial_transaction` flag is tracked as a signed integer, but we typically pass around flags via unsigned integers. Adapt the type accordingly. Suggested-by: Christian Couder <christian.couder@gmail.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--refs.c2
-rw-r--r--refs.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/refs.c b/refs.c
index 65eea3eb77..ee87081746 100644
--- a/refs.c
+++ b/refs.c
@@ -2325,7 +2325,7 @@ int refs_verify_refname_available(struct ref_store *refs,
const char *refname,
const struct string_list *extras,
const struct string_list *skip,
- int initial_transaction,
+ unsigned int initial_transaction,
struct strbuf *err)
{
const char *slash;
diff --git a/refs.h b/refs.h
index 980bd20cf2..95baf194ba 100644
--- a/refs.h
+++ b/refs.h
@@ -110,7 +110,7 @@ int refs_verify_refname_available(struct ref_store *refs,
const char *refname,
const struct string_list *extras,
const struct string_list *skip,
- int initial_transaction,
+ unsigned int initial_transaction,
struct strbuf *err);
int refs_ref_exists(struct ref_store *refs, const char *refname);