diff options
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 757f9a08dd..f4d4db1ee2 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -78,7 +78,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 |