From: Jonathan Nieder Date: Sat, 16 Dec 2017 01:31:30 GMT Subject: Re: feature-request: git "cp" like there is git mv. Message-ID: <20171216013130.GB188893@aiede.mtv.corp.google.com> In-Reply-To: Hi Simon, Simon Doodkin wrote: > 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