X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fcheckout.c;h=4761769512a8abcdd5652a93d39be18154e251dd;hb=f7d59e256884f63adeed9a1f3376a386a28681ff;hp=38632fc39805085e3b134e0574f3846931c150c6;hpb=a211e6712bac61a00f8182a8eedb6683dbe4d31f;p=git.git diff --git a/builtin/checkout.c b/builtin/checkout.c index 38632fc39..476176951 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -79,7 +79,10 @@ static int update_some(const unsigned char *sha1, const char *base, int baselen, static int read_tree_some(struct tree *tree, const char **pathspec) { - read_tree_recursive(tree, "", 0, 0, pathspec, update_some, NULL); + struct pathspec ps; + init_pathspec(&ps, pathspec); + read_tree_recursive(tree, "", 0, 0, &ps, update_some, NULL); + free_pathspec(&ps); /* update the index with the given tree's info * for all args, expanding wildcards, and exit