diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2021-08-14 07:56:22 +0800 |
---|---|---|
committer | Jiang Xin <worldhello.net@gmail.com> | 2021-08-14 07:56:22 +0800 |
commit | 117e2caa42210de5c2c1ecfdf5d2bda056cd6f00 (patch) | |
tree | c742277e7f21ad2746a807e2c0318a0fae662f5f /builtin/checkout.c | |
parent | Merge branch 'master' of github.com:nafmo/git-l10n-sv (diff) | |
parent | Git 2.33-rc2 (diff) | |
download | tgif-117e2caa42210de5c2c1ecfdf5d2bda056cd6f00.tar.xz |
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (51 commits)
Git 2.33-rc2
object-file: use unsigned arithmetic with bit mask
Revert 'diff-merges: let "-m" imply "-p"'
object-store: avoid extra ';' from KHASH_INIT
oidtree: avoid nested struct oidtree_node
Git 2.33-rc1
test: fix for COLUMNS and bash 5
The eighth batch
diff: --pickaxe-all typofix
mingw: align symlinks-related rmdir() behavior with Linux
t7508: avoid non POSIX BRE
use fspathhash() everywhere
t0001: fix broken not-quite getcwd(3) test in bed67874e2
Documentation: render special characters correctly
reset: clear_unpack_trees_porcelain to plug leak
builtin/rebase: fix options.strategy memory lifecycle
builtin/merge: free found_ref when done
builtin/mv: free or UNLEAK multiple pointers at end of cmd_mv
convert: release strbuf to avoid leak
read-cache: call diff_setup_done to avoid leak
...
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r-- | builtin/checkout.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index f4cd7747d3..b5d477919a 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -378,9 +378,6 @@ static int checkout_worktree(const struct checkout_opts *opts, if (pc_workers > 1) init_parallel_checkout(); - /* TODO: audit for interaction with sparse-index. */ - ensure_full_index(&the_index); - for (pos = 0; pos < active_nr; pos++) { struct cache_entry *ce = active_cache[pos]; if (ce->ce_flags & CE_MATCHED) { @@ -530,8 +527,6 @@ static int checkout_paths(const struct checkout_opts *opts, * Make sure all pathspecs participated in locating the paths * to be checked out. */ - /* TODO: audit for interaction with sparse-index. */ - ensure_full_index(&the_index); for (pos = 0; pos < active_nr; pos++) if (opts->overlay_mode) mark_ce_for_checkout_overlay(active_cache[pos], @@ -1593,6 +1588,9 @@ static int checkout_main(int argc, const char **argv, const char *prefix, git_config(git_checkout_config, opts); + prepare_repo_settings(the_repository); + the_repository->settings.command_requires_full_index = 0; + opts->track = BRANCH_TRACK_UNSPECIFIED; if (!opts->accept_pathspec && !opts->accept_ref) |