Re: [PATCH] git-mv: succeed even if source is a prefix of destination
- From
Fredrik Kuivinen <freku045@student.liu.se>
- Date
- Aug 16, 2006, 05:49 UTC
- Message-ID
- <20060816054944.GA5218@c165.ib.student.liu.se>
- In-Reply-To
- <Pine.LNX.4.63.0608160209150.28360@wbgn013.biozentrum.uni-wuerzburg.de>
On Wed, Aug 16, 2006 at 02:20:32AM +0200, Johannes Schindelin wrote:
Show 7 quoted lines
> > 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