From: Jakub Narebski Date: Mon, 11 Feb 2008 01:30:06 GMT Subject: Re: [RFC/PATCH] Implement git-cp. Message-ID: <200802110230.06808.jnareb@gmail.com> In-Reply-To: <7vzlu9uu7c.fsf@gitster.siamese.dyndns.org> Junio C Hamano wrote: > Johannes Schindelin writes: > > > If you touch builtin-mv.c already, why not just move cmd_cp() in there? > > It's not like it would be the first cmd_*() function living in the same > > file as other cmd_*() functions. > > Why do we even want "git-cp", especially when git-mv and git-rm > are already pretty much redundant commands? git-rm is not redundant: without it how we could easily un-add a file (without resorting to porcelain or tricks). I think it is also safer that ordinary rm (check for being up-to-date, i.e. for modified files). The above also reflects git-mv, as half of it is git-rm (although without some issues). Also git-mv could skip over non git-controlled files. > Especially, why do we even encourage copy-and-paste? But git-cp would be IMHO a convenience only. The half of pros for git-mv applies to this too; unfortunately the second part of pros for git-mv does not apply for git-cp. Would git-cp encourage copy'n'paste programming? I'm not sure... -- Jakub Narebski Poland