Re: feature-request: git "cp" like there is git mv.
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 16, 2017, 01:31 UTC
- Message-ID
- <20171216013130.GB188893@aiede.mtv.corp.google.com>
- In-Reply-To
- <CANaQPdK4xWek3PhiFZrURBBTgPBwsC3d3watd-cWVNBVZRqZRA@mail.gmail.com>
Hi Simon,
Simon Doodkin wrote:
Show 5 quoted lines
> please develop a new feature, git "cp" like there is git mv tomovefile1 tofile2 > (to save space). > > there is a solution in https://stackoverflow.com/a/44036771/466363 > however, it is not single easy command.
This sounds like a reasonable thing to add. See builtin/mv.c for how "git mv" works if you're looking for inspiration.
cmd_mv in that file looks rather long, so I'd also be happy if someone interested refactors to break it into multiple self-contained pieces for easier reading (git mostly follows https://www.kernel.org/doc/html/latest/process/coding-style.html#functions).
Thanks, Jonathan