diff options
| author | Vicent Marti <tanoku@gmail.com> | 2015-10-27 17:26:04 +0100 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2015-10-28 10:13:13 +0100 |
| commit | 1e5e02b4f47779fe3733b1a6ab24a6ca13099ec3 (patch) | |
| tree | ac854971d3609c9065cbaee0119541428bdc9477 /src/checkout.c | |
| parent | efc659b071e02c6d3b39b32b35ab83233d978956 (diff) | |
| download | libgit2-1e5e02b4f47779fe3733b1a6ab24a6ca13099ec3.tar.gz | |
pool: Simplify implementation
Diffstat (limited to 'src/checkout.c')
| -rw-r--r-- | src/checkout.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/checkout.c b/src/checkout.c index 632556622..d09357f2a 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -1255,11 +1255,13 @@ static int checkout_get_actions( int error = 0, act; const git_index_entry *wditem; git_vector pathspec = GIT_VECTOR_INIT, *deltas; - git_pool pathpool = GIT_POOL_INIT_STRINGPOOL; + git_pool pathpool; git_diff_delta *delta; size_t i, *counts = NULL; uint32_t *actions = NULL; + git_pool_init(&pathpool, 1); + if (data->opts.paths.count > 0 && git_pathspec__vinit(&pathspec, &data->opts.paths, &pathpool) < 0) return -1; @@ -2439,10 +2441,11 @@ static int checkout_data_init( git_config_entry_free(conflict_style); } + git_pool_init(&data->pool, 1); + if ((error = git_vector_init(&data->removes, 0, git__strcmp_cb)) < 0 || (error = git_vector_init(&data->remove_conflicts, 0, NULL)) < 0 || (error = git_vector_init(&data->update_conflicts, 0, NULL)) < 0 || - (error = git_pool_init(&data->pool, 1, 0)) < 0 || (error = git_buf_puts(&data->path, data->opts.target_directory)) < 0 || (error = git_path_to_dir(&data->path)) < 0 || (error = git_strmap_alloc(&data->mkdir_map)) < 0) |
