bisect.c: reduce scope of variable
authorElia Pinto <gitter.spiros@gmail.com>
Wed, 29 Jan 2014 13:25:00 +0000 (05:25 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 31 Jan 2014 18:44:04 +0000 (10:44 -0800)
Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bisect.c
index 1e46a4f50e16f059fa768cecc4c8331a88997021..c718249a822656df29cb7ecdb10bbd8884cef61e 100644 (file)
--- a/bisect.c
+++ b/bisect.c
@@ -685,7 +685,6 @@ static void mark_expected_rev(char *bisect_rev_hex)
 
 static int bisect_checkout(char *bisect_rev_hex, int no_checkout)
 {
-       int res;
 
        mark_expected_rev(bisect_rev_hex);
 
@@ -696,6 +695,7 @@ static int bisect_checkout(char *bisect_rev_hex, int no_checkout)
                        die("update-ref --no-deref HEAD failed on %s",
                            bisect_rev_hex);
        } else {
+               int res;
                res = run_command_v_opt(argv_checkout, RUN_GIT_CMD);
                if (res)
                        exit(res);