stash: convert pop to builtin
[gitweb.git] / builtin / checkout.c
index b30b48767e54a93f18ef0d341a04f14cc390e9a9..acdafc6e4c4d104aadcbe7492a8045e16e83ba50 100644 (file)
@@ -214,7 +214,8 @@ static int checkout_merged(int pos, const struct checkout *state)
         * merge.renormalize set, too
         */
        status = ll_merge(&result_buf, path, &ancestor, "base",
-                         &ours, "ours", &theirs, "theirs", NULL);
+                         &ours, "ours", &theirs, "theirs",
+                         state->istate, NULL);
        free(ancestor.ptr);
        free(ours.ptr);
        free(theirs.ptr);
@@ -397,7 +398,7 @@ static void show_local_changes(struct object *head,
 {
        struct rev_info rev;
        /* I think we want full paths, even if we're in a subdirectory. */
-       init_revisions(&rev, NULL);
+       repo_init_revisions(the_repository, &rev, NULL);
        rev.diffopt.flags = opts->flags;
        rev.diffopt.output_format |= DIFF_FORMAT_NAME_STATUS;
        diff_setup_done(&rev.diffopt);
@@ -497,7 +498,8 @@ static int skip_merge_working_tree(const struct checkout_opts *opts,
         * We must do the merge if we are actually moving to a new commit.
         */
        if (!old_branch_info->commit || !new_branch_info->commit ||
-               oidcmp(&old_branch_info->commit->object.oid, &new_branch_info->commit->object.oid))
+               !oideq(&old_branch_info->commit->object.oid,
+                      &new_branch_info->commit->object.oid))
                return 0;
 
        /*
@@ -898,7 +900,7 @@ static void orphaned_commit_warning(struct commit *old_commit, struct commit *ne
        struct rev_info revs;
        struct object *object = &old_commit->object;
 
-       init_revisions(&revs, NULL);
+       repo_init_revisions(the_repository, &revs, NULL);
        setup_revisions(0, NULL, &revs, NULL);
 
        object->flags &= ~UNINTERESTING;