Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-11 Thread Johannes Sixt
Am 11.05.2016 um 23:34 schrieb Junio C Hamano: Johannes Sixt writes: As this path is read from a file git itself creates, and if we know that it will always contain forward slashes, then I agree that it could be potentially confusing to later readers to see

Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-11 Thread Junio C Hamano
Johannes Sixt writes: >> As this path is read from a file git itself creates, and if we know >> that it will always contain forward slashes, then I agree that it >> could be potentially confusing to later readers to see >> git_find_last_dir_sep(). So, keeping it as-is seems

Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-11 Thread Johannes Sixt
Am 11.05.2016 um 19:32 schrieb Eric Sunshine: On Wed, May 11, 2016 at 9:34 AM, Duy Nguyen wrote: On Wed, May 11, 2016 at 11:43 AM, Eric Sunshine wrote: On Wed, Apr 13, 2016 at 9:15 AM, Nguyễn Thái Ngọc Duy wrote: + if

Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-11 Thread Eric Sunshine
On Wed, May 11, 2016 at 9:34 AM, Duy Nguyen wrote: > On Wed, May 11, 2016 at 11:43 AM, Eric Sunshine > wrote: >> On Wed, Apr 13, 2016 at 9:15 AM, Nguyễn Thái Ngọc Duy >> wrote: >>> + if (is_directory(dst.buf)) { >>> +

Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-11 Thread Duy Nguyen
On Wed, May 11, 2016 at 11:43 AM, Eric Sunshine wrote: > On Wed, Apr 13, 2016 at 9:15 AM, Nguyễn Thái Ngọc Duy > wrote: >> 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

Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-10 Thread Eric Sunshine
On Wed, Apr 13, 2016 at 9:15 AM, Nguyễn Thái Ngọc Duy wrote: > 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