summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-06-13 08:59:32 -0700
committerVicent Martí <vicent@github.com>2012-06-13 08:59:32 -0700
commit53774eb8185e08da46cd322dc8fefaff7676fea4 (patch)
tree8abf1ee501c4e0501478f7ab43786519d595a2e0 /src
parent64e56478ad8b3310e957701ebe234764f9f4a147 (diff)
parentfa45d25f387d3727932b6439e84905e7fe64a85f (diff)
downloadlibgit2-53774eb8185e08da46cd322dc8fefaff7676fea4.tar.gz
Merge pull request #764 from sleeper/issue_763
Fix issue #763
Diffstat (limited to 'src')
-rw-r--r--src/branch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/branch.c b/src/branch.c
index 5d5a24038..8b97a8206 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -149,9 +149,11 @@ static int branch_list_cb(const char *branch_name, void *payload)
{
branch_filter_data *filter = (branch_filter_data *)payload;
- if ((filter->branch_type & GIT_BRANCH_LOCAL && git__prefixcmp(branch_name, GIT_REFS_HEADS_DIR) == 0)
- || (filter->branch_type & GIT_BRANCH_REMOTE && git__prefixcmp(branch_name, GIT_REFS_REMOTES_DIR) == 0))
- return git_vector_insert(filter->branchlist, git__strdup(branch_name));
+ if (filter->branch_type & GIT_BRANCH_LOCAL && git__prefixcmp(branch_name, GIT_REFS_HEADS_DIR) == 0) {
+ return git_vector_insert(filter->branchlist, git__strdup(branch_name +strlen(GIT_REFS_HEADS_DIR)));
+ } else if (filter->branch_type & GIT_BRANCH_REMOTE && git__prefixcmp(branch_name, GIT_REFS_REMOTES_DIR) == 0) {
+ return git_vector_insert(filter->branchlist, git__strdup(branch_name+strlen(GIT_REFS_DIR)));
+ }
return 0;
}