git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: "Francis Moreau" <francis.moro@gmail.com>, git@vger.kernel.org
Subject: Re: What about git cp ?
Date: Sun, 03 Feb 2008 11:07:10 -0800 (PST)	[thread overview]
Message-ID: <m3tzkp6eqz.fsf@localhost.localdomain> (raw)
In-Reply-To: <vpq63x5swsj.fsf@bauges.imag.fr>

Matthieu Moy <Matthieu.Moy@imag.fr> writes:

> "Francis Moreau" <francis.moro@gmail.com> writes:
> 
> > Hello,
> >
> > I'm looking for a something which could be done by a git-cp
> > command.
> >
> > I'd like to copy a file with its history to a new file but want to
> > keep the old one,
> 
> Git doesn't _record_ copies and renames, but detects them
> after-the-fact (either by default, or explicitly like "git blame -C"
> or so).
> 
> So, just "cp + git add" and you're done. That's what a "git cp"
> command would do if it existed.

You can just put git-cp shell script doing this in PATH (or
GIT_EXEC_PATH if they are different) for "git cp" to just work.
Or you can write builtin-cp.c, following builtin-mv.c

-- 
Jakub Narebski
Poland
ShadeHawk on #git

  reply	other threads:[~2008-02-03 19:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-03 18:23 What about git cp ? Francis Moreau
2008-02-03 18:46 ` Matthieu Moy
2008-02-03 19:07   ` Jakub Narebski [this message]
2008-02-10  1:12     ` [RFC/PATCH] Implement git-cp Miklos Vajna
2008-02-10  1:26       ` Johannes Schindelin
2008-02-10  7:49         ` Junio C Hamano
2008-02-10 12:33           ` Johannes Schindelin
2008-02-10 12:42             ` Miklos Vajna
2008-02-10 13:29           ` Robin Rosenberg
2008-02-11  1:30           ` Jakub Narebski
2008-02-11 10:18           ` Matthieu Moy
2008-02-11 13:43             ` Miklos Vajna
2008-02-10 18:24         ` [PATCH] " Miklos Vajna
2008-02-03 18:55 ` What about git cp ? Remi Vanicat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tzkp6eqz.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=francis.moro@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).