Re: [PATCHv2] git-mv: Keep moved index entries inact
- From
Petr Baudis <pasky@suse.cz>
- Date
- Jul 27, 2008, 13:41 UTC
- Message-ID
- <20080727134142.GA10151@machine.or.cz>
- In-Reply-To
- <7v8wvpm9cl.fsf@gitster.siamese.dyndns.org>
On Fri, Jul 25, 2008 at 11:46:02PM -0700, Junio C Hamano wrote:
> Thanks. I think I've managed to fix the rename_index_entry_at() in a > satisfactory way, and also made builtin-mv to allow "mv -f symlink file" > and "mv -f file symlink".
Oh, sorry, I didn't realize there were still problems with the original one, I would try it on my own in that case.
Show 16 quoted lines
> So my take on the above test piece is that after: > > >moved > mkdir dir > >dir/file > ln -s dir symlink > git add moved dir symlink > > This should fail, as it is an overwrite: > > git mv moved symlink > > and with "-f", the command should simply remove symlink and replace it > with a regular file whose contents come from the original "moved". > > IOW, what a symlink points at should not matter.
You convinced me, yes. (Especially since I started actually using symlinks in some of my projects very recently and this would be the exact semantic I would eventually expect as well.)
-- Petr "Pasky" Baudis As in certain cults it is possible to kill a process if you know its true name. -- Ken Thompson and Dennis M. Ritchie