From: Fredrik Kuivinen Date: Wed, 16 Aug 2006 05:49:44 GMT Subject: Re: [PATCH] git-mv: succeed even if source is a prefix of destination Message-ID: <20060816054944.GA5218@c165.ib.student.liu.se> In-Reply-To: On Wed, Aug 16, 2006 at 02:20:32AM +0200, Johannes Schindelin wrote: > > As noted by Fredrik Kuivinen, without this patch, git-mv fails on > > git-mv README README-renamed > > because "README" is a prefix of "README-renamed". > Thank you. 'git-mv README README-renamed' works for me too now. However, there still seems to be some minor problem with git-mv. $ git mv t t fatal: renaming t failed: Invalid argument $ git mv t t/ fatal: renaming t failed: Invalid argument $ git mv t/ t/ fatal: cannot move directory over file, source=t/, destination=t/ $ git mv t/ t fatal: cannot move directory over file, source=t/, destination=t/ I kind of expected to get 'can not move directory into itself' in all of those cases. At least the same error messages should be given in all cases. It looks like we need some kind of path normalization before we do those tests. - Fredrik