Subject: [PATCH 8/8] mv: combine two if(s)

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Fri, 8 Aug 2014 20:11:02 +0700

Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
---
 builtin/mv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/builtin/mv.c b/builtin/mv.c
index a2e33b5..4eb420b 100644
--- a/builtin/mv.c
+++ b/builtin/mv.c
@@ -276,10 +276,9 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
 	if (gitmodules_modified)
 		stage_updated_gitmodules();
 
-	if (active_cache_changed) {
-		if (write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
+	if (active_cache_changed &&
+	    write_locked_index(&the_index, &lock_file, COMMIT_LOCK))
 			die(_("Unable to write new index file"));
-	}
 
 	return 0;
 }
-- 
2.1.0.rc0.78.gc0d8480