Re: [PATCH 5/6] worktree move: refuse to move worktrees with submodules
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 21, 2017, 02:47 UTC
- Message-ID
- <xmqqvapy5vdy.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170420101024.7593-6-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 6 quoted lines
> 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.