From: Shreyansh Paliwal Date: Sat, 28 Mar 2026 12:45:30 GMT Subject: Re: [PATCH 1/5] refs: make branchname helpers repository aware Message-ID: In-Reply-To: On Fri, Mar 27, 2026 at 1:20 PM Patrick Steinhardt wrote: > > 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. Got it. I will send a reroll for that. Thanks for reviewing.