match-trees: use hashcpy to splice trees
[gitweb.git] / builtin / branch.c
index 0c55f7f065d6ceb34d27a165160192fabe9f22d1..1be727209b7ceaead46d0bc5e4b9666fbe7ef7a1 100644 (file)
@@ -783,7 +783,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                 * create_branch takes care of setting up the tracking
                 * info and making sure new_upstream is correct
                 */
-               create_branch(branch->name, new_upstream, 0, 0, 0, quiet, BRANCH_TRACK_OVERRIDE);
+               create_branch(the_repository, branch->name, new_upstream,
+                             0, 0, 0, quiet, BRANCH_TRACK_OVERRIDE);
        } else if (unset_upstream) {
                struct branch *branch = branch_get(argv[0]);
                struct strbuf buf = STRBUF_INIT;
@@ -814,7 +815,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                if (track == BRANCH_TRACK_OVERRIDE)
                        die(_("the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead."));
 
-               create_branch(argv[0], (argc == 2) ? argv[1] : head,
+               create_branch(the_repository,
+                             argv[0], (argc == 2) ? argv[1] : head,
                              force, 0, reflog, quiet, track);
 
        } else