worktree: allow "-" short-hand for @{-1} in add command
commit1a450e2fd1f82311b214851d5b097b74c8fb0ade
authorJordan DE GEA <jordan.de-gea@grenoble-inp.org>
Fri, 27 May 2016 13:17:08 +0000 (27 15:17 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 May 2016 19:28:25 +0000 (31 12:28 -0700)
treef06a2ef566d95a336e854212c7ad41aed2f7912d
parentf3913c2d03abc660140678a9e14dac399f847647
worktree: allow "-" short-hand for @{-1} in add command

Since `git worktree add` uses `git checkout` when `[<branch>]` is used,
and `git checkout -` is already supported, it makes sense to allow the
same shortcut in `git worktree add`.

Signed-off-by: Jordan DE GEA <jordan.de-gea@grenoble-inp.org>
Signed-off-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-worktree.txt
builtin/worktree.c
t/t2025-worktree-add.sh