]> git.ipfire.org Git - thirdparty/git.git/commit - strbuf.c
worktree move: accept destination as directory
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Mon, 12 Feb 2018 09:49:37 +0000 (16:49 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Feb 2018 21:13:35 +0000 (13:13 -0800)
commitc64a8d200f4109df86c6d4716ea4da58df450e34
treeeaf8198f7aa5a888178e7a807dcc482c988b30fe
parent9f792bb4721066ce27ee98c4ad38d6d146b64fcf
worktree move: accept destination as directory

Similar to "mv a b/", which is actually "mv a b/a", we extract basename
of source worktree and create a directory of the same name at
destination if dst path is a directory.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/worktree.c
strbuf.c
strbuf.h
t/t2028-worktree-move.sh