Re: feature-request: git "cp" like there is git mv.

2018-03-18 Thread Stefan Moch
* Junio C Hamano <gits...@pobox.com> [2018-02-07T11:49:39-0800]: > Stefan Moch <stefanm...@mail.de> writes: > > > * Jonathan Nieder <jrnie...@gmail.com> [2017-12-15T17:31:30-0800]: > >> This sounds like a reasonable thing to add. See builtin/mv.c for &g

[PATCH 2/2] mv: remove unneeded 'if (!show_only)'

2017-12-31 Thread Stefan Moch
Commit a127331cd (mv: allow moving nested submodules, 2016-04-19), introduced if (show_only) continue; in this for-loop before if (!show_only) which became redundant, because it is now always true. Signed-off-by: Stefan Moch <stefanm...@mail.de> --- builtin/mv.c | 3 +--

[PATCH 1/2] Add test case for mv --dry-run to t7001-mv.sh

2017-12-31 Thread Stefan Moch
It checks if mv --dry-run does not move file. Signed-off-by: Stefan Moch <stefanm...@mail.de> --- t/t7001-mv.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 6e5031f56..d4e6485a2 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -38,6

Re: feature-request: git "cp" like there is git mv.

2017-12-31 Thread Stefan Moch
* Jonathan Nieder [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