Subject: Re: [RFC/PATCH] Implement git-cp.

From: Jakub Narebski <[email-masked]>
Date: Mon, 11 Feb 2008 02:30:06 +0100

Junio C Hamano wrote:
> Johannes Schindelin <[email-masked]> 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