Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2012-11-02 00:47:18 +0400
committerEdward Thomson <ethomson@edwardthomson.com>2012-11-11 21:56:33 +0400
commitb0f6e45d149c033c9fe41d49af2a87d169d11f40 (patch)
tree7cc89f19d1ddbe8ded27944756eccc51f57b8205 /src/branch.c
parentd18713fb4ad1ba3d18a75272e1c1c3eb45715aba (diff)
create FETCH_HEAD specially instead of as a ref file
Diffstat (limited to 'src/branch.c')
-rw-r--r--src/branch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/branch.c b/src/branch.c
index 43bebd9ef..62c4adbf4 100644
--- a/src/branch.c
+++ b/src/branch.c
@@ -268,6 +268,11 @@ 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) {
+ error = GIT_ENOTFOUND;
+ goto cleanup;
+ }
if (strcmp(".", remote_name) != 0) {
if ((error = git_remote_load(&remote, git_reference_owner(branch), remote_name)) < 0)