From: Stefan Sperling Subject: Re: Smartest way to rename? To: Matthias Schmidt Cc: gameoftrees@openbsd.org Date: Sun, 5 May 2024 11:40:54 +0200 On Sun, May 05, 2024 at 09:57:07AM +0200, Matthias Schmidt wrote: > Hi everyone, > > is > > $ cp A B > $ got add B > $ got remove A > $ got ci > > the smartest way to rename A to B? Not the smartest way, but the only way at present. > I checked got(1) and gotadmin(1) and couldn't find anything similar to git's mv. > Maybe it's worth to add something to the EXAMPLES section? If users see "move" or "rename" they will (reasonbly) expect an atomic move/rename operation to occur which then seamlessly carries over into all update/merge operations. But Got cannot do this yet. I don't want to repeat the mistake Subversion made by adding a 'move' command which does no more than a copy + delete. This is problematic once changes are merged because the copy and delete operations will happen independently of each other. If users have to run add and remove they will (hopefully) understand that the operations will carry through the system as such, at least until rename-tracking heuristics are added to Got. For way too much background detail on this topic, see my Bsc thesis from 2008: https://stsp.name/thesis-tree-conflicts.pdf Also, if you've ever used a recent SVN client (1.14) and resolved tree conflicts with it, you've seen the conflict resolution system in action which I would like to implement again for Got, eventually.