diff options
author | Ben Straub <bstraub@github.com> | 2012-07-31 08:45:42 -0700 |
---|---|---|
committer | Ben Straub <bstraub@github.com> | 2012-07-31 08:45:42 -0700 |
commit | 7e02c7c56ac2a3dc8fce199b7b05a0bf51fa2417 (patch) | |
tree | b5ca5e52143a80ef483b8b4343842f737b56b5f4 | |
parent | 4bf5115642b64851f9a32a8157010b588bf44103 (diff) | |
download | libgit2-7e02c7c56ac2a3dc8fce199b7b05a0bf51fa2417.tar.gz |
Checkout: save index on checkout.
-rw-r--r-- | examples/network/clone.c | 1 | ||||
-rw-r--r-- | src/checkout.c | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/examples/network/clone.c b/examples/network/clone.c index 177a4c246..b7ac0fbe5 100644 --- a/examples/network/clone.c +++ b/examples/network/clone.c @@ -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; diff --git a/src/checkout.c b/src/checkout.c index 87116ba19..41acf1c11 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -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); |