From: Patrick Steinhardt <ps@pks.im>
To: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/5] refs: make branchname helpers repository aware
Date: Fri, 27 Mar 2026 08:49:57 +0100 [thread overview]
Message-ID: <acY2pZnCSEf5hcWZ@pks.im> (raw)
In-Reply-To: <20260325164833.1216577-2-shreyanshpaliwalcmsmn@gmail.com>
On Wed, Mar 25, 2026 at 10:14:18PM +0530, Shreyansh Paliwal wrote:
> diff --git a/branch.h b/branch.h
> index 3dc6e2a0ff..3aa53eb243 100644
> --- a/branch.h
> +++ b/branch.h
> @@ -111,7 +111,7 @@ const char *branch_checked_out(const char *refname);
> * Return 1 if the named branch already exists; return 0 otherwise.
> * Fill ref with the full refname for the branch.
> */
> -int validate_branchname(const char *name, struct strbuf *ref);
> +int validate_branchname(const char *name, struct strbuf *ref, struct repository *repo);
>
> /*
> * Check if a branch 'name' can be created as a new branch; die otherwise.
> @@ -119,7 +119,8 @@ int validate_branchname(const char *name, struct strbuf *ref);
> * Return 1 if the named branch already exists; return 0 otherwise.
> * Fill ref with the full refname for the branch.
> */
> -int validate_new_branchname(const char *name, struct strbuf *ref, int force);
> +int validate_new_branchname(const char *name, struct strbuf *ref, int force,
> + struct repository *repo);
>
> /*
> * Remove information about the merge state on the current
It's more customary in our code base to have the repository be the first
parameter. Other than that this patch looks good to me.
Patrick
next prev parent reply other threads:[~2026-03-27 7:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 16:44 [PATCH 0/5] refs: reduce reliance on the_repository global state Shreyansh Paliwal
2026-03-25 16:44 ` [PATCH 1/5] refs: make branchname helpers repository aware Shreyansh Paliwal
2026-03-27 7:49 ` Patrick Steinhardt [this message]
2026-03-25 16:44 ` [PATCH 2/5] refs: make get_files_ref_lock_timeout_ms() repostory aware Shreyansh Paliwal
2026-03-27 7:50 ` Patrick Steinhardt
2026-03-27 9:23 ` Burak Kaan Karaçay
2026-03-25 16:44 ` [PATCH 3/5] refs: remove the_hash_algo global state Shreyansh Paliwal
2026-03-25 16:44 ` [PATCH 4/5] refs/reftable-backend: drop uses of the_repository Shreyansh Paliwal
2026-03-27 7:50 ` Patrick Steinhardt
2026-03-25 16:44 ` [PATCH 5/5] refs/packed-backend: use ref_store->repo instead " Shreyansh Paliwal
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=acY2pZnCSEf5hcWZ@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=shreyanshpaliwalcmsmn@gmail.com \
/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