git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Feb 11, 2008, 10:18 UTC
Message-ID
<vpq1w7jzthu.fsf@bauges.imag.fr>
In-Reply-To
<7vzlu9uu7c.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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?
>
> Especially, why do we even encourage copy-and-paste?

I rarely (let's say: never ;-) ) copy-and-paste a C source file, but there are tons of cases wher I start a file by copying another (typically, a 10 lines long Makefile containing macro definitions and an "include" statement, to be copied in each subdirectory and adapted to reflect the source file name, or starting a .txt file based on a skeleton).

I can very well live without a "git cp" command, but I'd use it if it was available.

-- 
Matthieu
Previous: Jakub NarebskiNext: Miklos Vajna
Message 11 of 14 in “What about git cp ?”
  1. Francis MoreauFeb 3, 2008
  2. Matthieu MoyFeb 3, 2008
  3. Jakub NarebskiFeb 3, 2008
  4. Implement git-cp.Miklos Vajna, Feb 10, 2008
  5. Johannes SchindelinFeb 10, 2008
  6. Junio C HamanoFeb 10, 2008
  7. Johannes SchindelinFeb 10, 2008
  8. Miklos VajnaFeb 10, 2008
  9. Robin RosenbergFeb 10, 2008
  10. Jakub NarebskiFeb 11, 2008
  11. Matthieu MoyFeb 11, 2008
  12. Miklos VajnaFeb 11, 2008
  13. Implement git-cp.Miklos Vajna, Feb 10, 2008
  14. Remi VanicatFeb 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.