doc: move git-cherry to plumbing
[gitweb.git] / unpack-trees.c
index 5d11f10e665350cd6cc11acbc275e4051ae92e27..f25089b878a8b0842a9d6407cb6b1821867a737c 100644 (file)
@@ -353,7 +353,7 @@ static int check_updates(struct unpack_trees_options *o)
        progress = get_progress(o);
 
        if (o->update)
-               git_attr_set_direction(GIT_ATTR_CHECKOUT, index);
+               git_attr_set_direction(GIT_ATTR_CHECKOUT);
 
        if (should_update_submodules() && o->update && !o->dry_run)
                load_gitmodules_file(index, NULL);
@@ -413,7 +413,7 @@ static int check_updates(struct unpack_trees_options *o)
        stop_progress(&progress);
        errs |= finish_delayed_checkout(&state);
        if (o->update)
-               git_attr_set_direction(GIT_ATTR_CHECKIN, NULL);
+               git_attr_set_direction(GIT_ATTR_CHECKIN);
        return errs != 0;
 }
 
@@ -1658,7 +1658,7 @@ static int verify_clean_subdirectory(const struct cache_entry *ce,
        memset(&d, 0, sizeof(d));
        if (o->dir)
                d.exclude_per_dir = o->dir->exclude_per_dir;
-       i = read_directory(&d, &the_index, pathbuf, namelen+1, NULL);
+       i = read_directory(&d, o->src_index, pathbuf, namelen+1, NULL);
        if (i)
                return o->gently ? -1 :
                        add_rejected_path(o, ERROR_NOT_UPTODATE_DIR, ce->name);
@@ -1700,7 +1700,7 @@ static int check_ok_to_remove(const char *name, int len, int dtype,
                return 0;
 
        if (o->dir &&
-           is_excluded(o->dir, &the_index, name, &dtype))
+           is_excluded(o->dir, o->src_index, name, &dtype))
                /*
                 * ce->name is explicitly excluded, so it is Ok to
                 * overwrite it.