Commit 7e02c7c5 by Ben Straub

Checkout: save index on checkout.

parent 4bf51156
......@@ -38,7 +38,6 @@ int clone(git_repository *repo, int argc, char **argv)
pthread_t worker;
// Validate args
printf("argc %d\n");
if (argc < 3) {
printf("USAGE: %s <url> <path>\n", argv[0]);
return -1;
......
......@@ -192,6 +192,7 @@ int git_checkout_head(git_repository *repo, git_checkout_opts *opts, git_indexer
git_index *idx;
if (!(retcode = git_repository_index(&idx, repo))) {
if (!(retcode = git_index_read_tree(idx, tree, stats))) {
git_index_write(idx);
retcode = git_tree_walk(tree, checkout_walker, GIT_TREEWALK_POST, &payload);
}
git_index_free(idx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment