From mboxrd@z Thu Jan 1 00:00:00 1970 From: richard.maw at gmail.com (Richard Maw) Date: Mon, 1 Aug 2016 22:35:46 +0100 Subject: [PATCH v3 14/21] Find the default branch based on the contents of the namespace In-Reply-To: <20160801213553.16807-1-richard.maw@gmail.com> References: <20160801213553.16807-1-richard.maw@gmail.com> Message-ID: <20160801213553.16807-15-richard.maw@gmail.com> The find_current_ref callback does not need to be modified to strip off the namespace prefix, since the for_each_ref functions don't include the base ref prefix. Signed-off-by: Richard Maw --- cgit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgit.c b/cgit.c index 7b499ea..d664ab4 100644 --- a/cgit.c +++ b/cgit.c @@ -458,7 +458,7 @@ static char *find_default_branch(struct cgit_repo *repo) info.req_ref = repo->defbranch; info.first_ref = NULL; info.match = 0; - for_each_branch_ref(find_current_ref, &info); + cgit_for_each_namespaced_ref_in("refs/heads/", find_current_ref, &info); if (info.match) ref = info.req_ref; else -- 2.9.0