[PATCH 2/2] mv: remove unneeded 'if (!show_only)'
- From
- Stefan Moch <stefanmoch@mail.de>
- Date
- Dec 31, 2017, 19:11 UTC
- Message-ID
- <20171231191156.28359-3-stefanmoch@mail.de>
- In-Reply-To
- <20171231191156.28359-1-stefanmoch@mail.de>
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> --- builtin/mv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c index cf3684d90..8ce6a2ddd 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)
-- 2.14.3