git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Christian Couder <chriscool@tuxfamily.org>
Subject: [PATCH 1/2] refs: adapt `initial_transaction` flag to be unsigned
Date: Mon, 25 Nov 2024 08:34:42 +0100	[thread overview]
Message-ID: <20241125-pks-refs-migration-optimization-followup-v1-1-0e1b4a2af384@pks.im> (raw)
In-Reply-To: <20241125-pks-refs-migration-optimization-followup-v1-0-0e1b4a2af384@pks.im>

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>
---
 refs.c | 2 +-
 refs.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/refs.c b/refs.c
index 65eea3eb7734d03f09a22e8edfe5074d532398ff..ee870817466b7d6d6a6619ce0baffe17f3d5a39f 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 980bd20cf24e15144aeff991eeba8b27a936d386..95baf194ba9493f4e8f1f70924f0eb713e5bbd49 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);

-- 
2.47.0.274.g962d0b743d.dirty


  reply	other threads:[~2024-11-25  7:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25  7:34 [PATCH 0/2] refs: stylistic improvements to ref migration optimization Patrick Steinhardt
2024-11-25  7:34 ` Patrick Steinhardt [this message]
2024-11-26  8:22   ` [PATCH 1/2] refs: adapt `initial_transaction` flag to be unsigned Junio C Hamano
2024-11-25  7:34 ` [PATCH 2/2] reftable: rename scratch buffer Patrick Steinhardt
2024-11-25  9:35 ` [PATCH 0/2] refs: stylistic improvements to ref migration optimization Christian Couder
2024-11-25 23:39   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241125-pks-refs-migration-optimization-followup-v1-1-0e1b4a2af384@pks.im \
    --to=ps@pks.im \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).