diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-07-14 20:29:53 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-08-29 15:27:36 +0200 |
commit | 389526043a277afec9dd8b8dcd9aa97c4b3f2d6e (patch) | |
tree | de71b58bc86cd37c6384c1c7ce35c20da7e0cd75 | |
parent | d99c8ca1783cfd04869e88f8707c036fc6053a05 (diff) | |
download | libgit2-389526043a277afec9dd8b8dcd9aa97c4b3f2d6e.tar.gz |
remote: restrict default branch to branches namespace
-rw-r--r-- | src/remote.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/remote.c b/src/remote.c index 433015f60..8d35fd69a 100644 --- a/src/remote.c +++ b/src/remote.c @@ -1971,6 +1971,9 @@ int git_remote_default_branch(git_buf *out, git_remote *remote) if (git_oid_cmp(head_id, &heads[i]->oid)) continue; + if (git__prefixcmp(heads[i]->name, GIT_REFS_HEADS_DIR)) + continue; + if (!guess) { guess = heads[i]; continue; |