summaryrefslogtreecommitdiff
path: root/builtin/mv.c
diff options
context:
space:
mode:
authorStefan Moch <stefanmoch@mail.de>2017-12-31 19:11:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-07 19:43:51 (GMT)
commit4cbe92fd41567e48ca60f4c810479b63ba8421fd (patch)
treeea33a8b9ca93ace49345d9a3efa4f998a92aa0f5 /builtin/mv.c
parent36b78cd9db97f3665935e4b32ff9566e4bbd0d17 (diff)
downloadgit-4cbe92fd41567e48ca60f4c810479b63ba8421fd.zip
git-4cbe92fd41567e48ca60f4c810479b63ba8421fd.tar.gz
git-4cbe92fd41567e48ca60f4c810479b63ba8421fd.tar.bz2
mv: remove unneeded 'if (!show_only)'
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 <stefanmoch@mail.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/mv.c')
-rw-r--r--builtin/mv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/mv.c b/builtin/mv.c
index dcf6736..9662804 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -287,8 +287,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)