mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 00:43:41 +00:00
Checkout: save index on checkout.
This commit is contained in:
parent
4bf5115642
commit
7e02c7c56a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user