* Jonathan Nieder <jrnieder@xxxxxxxxx> [2017-12-15T17:31:30-0800]: > 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). I looked at builtin/mv.c and have a rough idea how to split it up to support both mv and cp commands. But first I noticed and removed a redundant check in cmd_mv, also added a test case to check if mv --dry-run does not move the file. Stefan