Re: What about git cp ?
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Feb 3, 2008, 19:07 UTC
- Message-ID
- <m3tzkp6eqz.fsf@localhost.localdomain>
- In-Reply-To
- <vpq63x5swsj.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 16 quoted lines
> "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