The man page states that using git-cp will "Copy a file keeping its history", however, the history is not preserved.
Repro steps:
- Use git-cp to copy an existing file, e.g. `git cp
- Do
git diff HEAD^ - see that git considers the entire copied file to be completely new code authored by the current user
As you can see in the source code, rather than following the process referenced by the man page, the current implementation just simply copies the file using cp -r and adds a commit without any steps to keep the git file history.
The man page states that using
git-cpwill "Copy a file keeping its history", however, the history is not preserved.Repro steps:
git diff HEAD^- see that git considers the entire copied file to be completely new code authored by the current userAs you can see in the source code, rather than following the process referenced by the man page, the current implementation just simply copies the file using
cp -rand adds a commit without any steps to keep the git file history.