Rename interpret/substitute nth_last_branch functions
[gitweb.git] / builtin-checkout.c
index 20b34ce6e10d9b863226b501cf5a35178b898995..a8d9d97da202952eda503f28e006737ff34c7d5b 100644 (file)
@@ -295,6 +295,8 @@ static void show_local_changes(struct object *head)
        init_revisions(&rev, NULL);
        rev.abbrev = 0;
        rev.diffopt.output_format |= DIFF_FORMAT_NAME_STATUS;
+       if (diff_setup_done(&rev.diffopt) < 0)
+               die("diff_setup_done failed");
        add_pending_object(&rev, head, NULL);
        run_diff_index(&rev, 0);
 }
@@ -353,7 +355,7 @@ static void setup_branch_path(struct branch_info *branch)
        struct strbuf buf = STRBUF_INIT;
        int ret;
 
-       if ((ret = interpret_nth_last_branch(branch->name, &buf))
+       if ((ret = interpret_branch_name(branch->name, &buf))
            && ret == strlen(branch->name)) {
                branch->name = xstrdup(buf.buf);
                strbuf_splice(&buf, 0, 0, "refs/heads/", 11);
@@ -405,7 +407,7 @@ static int merge_working_tree(struct checkout_opts *opts,
                topts.verbose_update = !opts->quiet;
                topts.fn = twoway_merge;
                topts.dir = xcalloc(1, sizeof(*topts.dir));
-               topts.dir->show_ignored = 1;
+               topts.dir->flags |= DIR_SHOW_IGNORED;
                topts.dir->exclude_per_dir = ".gitignore";
                tree = parse_tree_indirect(old->commit->object.sha1);
                init_tree_desc(&trees[0], tree->buffer, tree->size);