From 4cbe92fd41567e48ca60f4c810479b63ba8421fd Mon Sep 17 00:00:00 2001 From: Stefan Moch Date: Sun, 31 Dec 2017 20:11:56 +0100 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- builtin/mv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/mv.c b/builtin/mv.c index dcf6736b5b..9662804d23 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)