From: Junio C Hamano Date: Fri, 21 Apr 2017 02:47:53 GMT Subject: Re: [PATCH 5/6] worktree move: refuse to move worktrees with submodules Message-ID: In-Reply-To: <20170420101024.7593-6-pclouds@gmail.com> Nguyễn Thái Ngọc Duy writes: > Submodules contains .git files with relative paths. After a worktree > move, these files need to be updated or they may point to nowhere. > > This is a bandage patch to make sure "worktree move" don't break > people's worktrees by accident. When .git file update code is in > place, this validate_no_submodules() could be removed. Right. I am OK with "small steps first" approach like this. We'd need to document the limitation, though, i.e. "Note that you cannot move the primary working tree. Also you cannot move a working tree that has a submodule." Again drop "yet" from the error message. Our aspiration does not ease the pain the end users get when they are given the error message.