summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-03-22 14:24:25 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-22 14:24:25 -0700
commitc9bc2c5d4dd42a2448c63fe097fa8d43222dd5cb (patch)
tree4ddfa4fee0414b51ab9ddc0a82a22d36f9ea77ac /builtin
parentMerge branch 'tg/worktree-create-tracking' into maint (diff)
parentmv: remove unneeded 'if (!show_only)' (diff)
downloadtgif-c9bc2c5d4dd42a2448c63fe097fa8d43222dd5cb.tar.xz
Merge branch 'sm/mv-dry-run-update' into maint
Code clean-up. * sm/mv-dry-run-update: mv: remove unneeded 'if (!show_only)' t7001: add test case for --dry-run
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/mv.c b/builtin/mv.c
index cf3684d907..8ce6a2ddd4 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -286,8 +286,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
pos = cache_name_pos(src, strlen(src));
assert(pos >= 0);
- if (!show_only)
- rename_cache_entry_at(pos, dst);
+ rename_cache_entry_at(pos, dst);
}
if (gitmodules_modified)