diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2015-07-17 19:00:12 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-20 11:29:52 -0700 |
commit | 80a0548f6c12f43e9bd62e13eacb033f05e2b001 (patch) | |
tree | 05cf608fee704b88993928bcc684fab7d27fd960 /builtin/bisect--helper.c | |
parent | worktree: elucidate environment variables intended for child processes (diff) | |
download | tgif-80a0548f6c12f43e9bd62e13eacb033f05e2b001.tar.xz |
worktree: add_worktree: construct worktree-population command locally
The caller of add_worktree() provides it with a command to invoke to
populate the new worktree. This was a useful abstraction during the
conversion of "git checkout --to" functionality to "git worktree add"
since git-checkout and git-worktree constructed the population command
differently. However, now that "git checkout --to" has been retired, and
add_worktree() has access to the options given to "worktree add", this
extra indirection is no longer useful and makes the code a bit
convoluted.
Moreover, the eventual goal is for git-worktree to make setting of HEAD
and worktree population distinct operations, whereas they are currently
conflated into a single git-checkout invocation. As such, add_worktree()
will eventually invoke other commands in addition to the worktree
population command, so it will be doing command construction itself
anyhow.
Therefore, relocate construction of the worktree population command from
add() to add_worktree().
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/bisect--helper.c')
0 files changed, 0 insertions, 0 deletions