diff options
author | Richard Maw <richard.maw@gmail.com> | 2016-06-26 00:55:44 +0300 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2016-07-13 22:09:37 +0300 |
commit | f1984bb2367c14ca86a6afbdd87fa6280cd1162b (patch) | |
tree | 76ebbd59b9eeced9606c7e6df25992b2a335067b | |
parent | 5817a8f70370c0d41950fb2e7516389866da89b7 (diff) |
Find the default branch based on the contents of the namespace
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 <richard.maw@gmail.com>
-rw-r--r-- | cgit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |