]> git.ipfire.org Git - thirdparty/git.git/commit
worktree: extract checkout_worktree()
authorDerrick Stolee <derrickstolee@github.com>
Wed, 23 Feb 2022 14:29:12 +0000 (14:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 20:24:41 +0000 (12:24 -0800)
commit23f832e29ec20ddbded431fdf55f49dc0f54e794
treef72c8f3700438a1816f6ca0dae5aa2aeaafd4a63
parentace5ac533a198e9bb7f634dafa8e7b10a42919c4
worktree: extract checkout_worktree()

The ability to add the --no-checkout flag to 'git worktree' was added in
ef2a0ac9a0 (worktree: add: introduce --checkout option, 2016-03-29).
Recently, we noticed that add_worktree() is rather complicated, so
extract the logic for this checkout process to simplify the method.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/worktree.c