git-rebase.txt: document incompatible options
[gitweb.git] / branch.c
index fe1e1c3676b26a4f35feaf8137700b25916ad5ee..f967c98f6324c49d9ab7f94f973230512af13707 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -3,12 +3,13 @@
 #include "config.h"
 #include "branch.h"
 #include "refs.h"
+#include "refspec.h"
 #include "remote.h"
 #include "commit.h"
 #include "worktree.h"
 
 struct tracking {
-       struct refspec spec;
+       struct refspec_item spec;
        char *src;
        const char *remote;
        int matches;
@@ -218,8 +219,8 @@ int validate_new_branchname(const char *name, struct strbuf *ref, int force)
 static int check_tracking_branch(struct remote *remote, void *cb_data)
 {
        char *tracking_branch = cb_data;
-       struct refspec query;
-       memset(&query, 0, sizeof(struct refspec));
+       struct refspec_item query;
+       memset(&query, 0, sizeof(struct refspec_item));
        query.dst = tracking_branch;
        return !remote_find_tracking(remote, &query);
 }
@@ -244,7 +245,7 @@ N_("\n"
 "\"git push -u\" to set the upstream config as you push.");
 
 void create_branch(const char *name, const char *start_name,
-                  int force, int reflog, int clobber_head,
+                  int force, int clobber_head_ok, int reflog,
                   int quiet, enum branch_track track)
 {
        struct commit *commit;
@@ -258,7 +259,7 @@ void create_branch(const char *name, const char *start_name,
        if (track == BRANCH_TRACK_EXPLICIT || track == BRANCH_TRACK_OVERRIDE)
                explicit_tracking = 1;
 
-       if ((track == BRANCH_TRACK_OVERRIDE || clobber_head)
+       if ((track == BRANCH_TRACK_OVERRIDE || clobber_head_ok)
            ? validate_branchname(name, &ref)
            : validate_new_branchname(name, &ref, force)) {
                if (!force)