pack-objects: name pack files after trailer hash
[gitweb.git] / branch.c
index f2d383fa7723a1f7a77bee6c5bd9f323766f6caf..9e6c68edaf90f27cf447ad1522da6d7de7827141 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -203,8 +203,7 @@ static int check_tracking_branch(struct remote *remote, void *cb_data)
        struct refspec query;
        memset(&query, 0, sizeof(struct refspec));
        query.dst = tracking_branch;
-       return !(remote_find_tracking(remote, &query) ||
-                prefixcmp(query.src, "refs/heads/"));
+       return !remote_find_tracking(remote, &query);
 }
 
 static int validate_remote_tracking_branch(char *ref)
@@ -307,7 +306,7 @@ void create_branch(const char *head,
                         start_name);
 
        if (real_ref && track)
-               setup_tracking(ref.buf+11, real_ref, track, quiet);
+               setup_tracking(ref.buf + 11, real_ref, track, quiet);
 
        if (!dont_change_ref)
                if (write_ref_sha1(lock, sha1, msg) < 0)