Re: [PATCH v2 10/11] worktree move: refuse to move worktrees with submodules

2016-12-19 Thread Stefan Beller
On Mon, Nov 28, 2016 at 1:43 AM, Nguyễn Thái Ngọc Duy wrote: > + > + if (S_ISGITLINK(ce->ce_mode)) { > + found_submodules = 1; > + break; > + } While I applaud being careful with submodules, I

[PATCH v2 10/11] worktree move: refuse to move worktrees with submodules

2016-11-28 Thread Nguyễn Thái Ngọc Duy
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_submodul