]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/git-worktree.txt
worktree: add --[no-]track option to the add subcommand
authorThomas Gummerer <t.gummerer@gmail.com>
Sun, 26 Nov 2017 19:43:53 +0000 (19:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Nov 2017 00:48:06 +0000 (09:48 +0900)
commite284e892ca278e4eb1e7eabd53a000bc897c3f25
tree6d8ef3b931f817cdcaf1eab9909bbc4e879d64a2
parentc4738aedc0aee085e25e20b6c32b9c4680f265d1
worktree: add --[no-]track option to the add subcommand

Currently 'git worktree add' sets up tracking branches if '<branch>' is
a remote tracking branch, and doesn't set them up otherwise, as is the
default for 'git branch'.

This may or may not be what the user wants.  Allow overriding this
behaviour with a --[no-]track flag that gets passed through to 'git
branch'.

We already respect branch.autoSetupMerge, as 'git worktree' just calls
'git branch' internally.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.txt
builtin/worktree.c
t/t2025-worktree-add.sh