summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-11-29 01:29:50 -0800
committerVicent Martí <vicent@github.com>2012-11-29 01:29:50 -0800
commitee06fec507360d50cd1c8c8d662f1d4f3e492624 (patch)
tree2912a0154a20596176ee0296a4f52e47040ff63d /src
parent2775d1cb8f20964207a41d03b31afb89c1c7fb8a (diff)
parent37849a8ec3aba526570f73f90bccb232ceefc426 (diff)
downloadlibgit2-ee06fec507360d50cd1c8c8d662f1d4f3e492624.tar.gz
Merge pull request #1083 from nulltoken/fix/tracking
Fix git_branch_tracking() for branches with empty merge and/or remote config entries
Diffstat (limited to 'src')
-rw-r--r--src/branch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/branch.c b/src/branch.c
index 5d7d443dc..7f73af81c 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -257,8 +257,8 @@ int git_branch_tracking(
if ((error = retrieve_tracking_configuration(&merge_name, branch, "branch.%s.merge")) < 0)
goto cleanup;
-
- if (remote_name == NULL || merge_name == NULL) {
+
+ if (!*remote_name || !*merge_name) {
error = GIT_ENOTFOUND;
goto cleanup;
}