worktree: allow "-" short-hand for @{-1} in add command
authorJordan DE GEA <redacted>
Fri, 27 May 2016 13:17:08 +0000 (15:17 +0200)
committerJunio C Hamano <redacted>
Tue, 31 May 2016 19:28:25 +0000 (12:28 -0700)
commit1a450e2fd1f82311b214851d5b097b74c8fb0ade
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 <redacted>
Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
Documentation/git-worktree.txt
builtin/worktree.c
t/t2025-worktree-add.sh
git clone https://git.99rst.org/PROJECT