Merge branch 'tg/stash-push'
[gitweb.git] / builtin / am.c
index bb5da422fc1ae06a8e5ad3735cd0cda69ff5abc1..f7a7a971fbe762a4fb691e786e86f681f2bbd7c1 100644 (file)
@@ -1049,7 +1049,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
        } else {
                write_state_text(state, "abort-safety", "");
                if (!state->rebasing)
-                       delete_ref("ORIG_HEAD", NULL, 0);
+                       delete_ref(NULL, "ORIG_HEAD", NULL, 0);
        }
 
        /*
@@ -2124,7 +2124,7 @@ static int safe_to_abort(const struct am_state *state)
 
        if (read_state_file(&sb, state, "abort-safety", 1) > 0) {
                if (get_oid_hex(sb.buf, &abort_safety))
-                       die(_("could not parse %s"), am_path(state, "abort_safety"));
+                       die(_("could not parse %s"), am_path(state, "abort-safety"));
        } else
                oidclr(&abort_safety);
 
@@ -2134,7 +2134,7 @@ static int safe_to_abort(const struct am_state *state)
        if (!oidcmp(&head, &abort_safety))
                return 1;
 
-       error(_("You seem to have moved HEAD since the last 'am' failure.\n"
+       warning(_("You seem to have moved HEAD since the last 'am' failure.\n"
                "Not rewinding to ORIG_HEAD"));
 
        return 0;
@@ -2172,7 +2172,7 @@ static void am_abort(struct am_state *state)
                                has_curr_head ? &curr_head : NULL, 0,
                                UPDATE_REFS_DIE_ON_ERR);
        else if (curr_branch)
-               delete_ref(curr_branch, NULL, REF_NODEREF);
+               delete_ref(NULL, curr_branch, NULL, REF_NODEREF);
 
        free(curr_branch);
        am_destroy(state);