]> git.ipfire.org Git - thirdparty/git.git/commitdiff
branch: remove negative exit code
authorGlen Choo <chooglen@google.com>
Tue, 29 Mar 2022 20:01:19 +0000 (20:01 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Mar 2022 23:45:05 +0000 (16:45 -0700)
Replace an instance of "exit(-1)" with "exit(1)". We don't use negative
exit codes - they are misleading because Unix machines will coerce them
to 8-bit unsigned values, losing the sign.

Signed-off-by: Glen Choo <chooglen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
branch.c

index add6a37b79b4055cba8f50b01dd8a0f0c2d7a9dd..ed6f993aa6ebf00156ac1f6b945995335f368f62 100644 (file)
--- a/branch.c
+++ b/branch.c
@@ -263,7 +263,7 @@ static void setup_tracking(const char *new_ref, const char *orig_ref,
                string_list_append(tracking.srcs, orig_ref);
        if (install_branch_config_multiple_remotes(config_flags, new_ref,
                                tracking.remote, tracking.srcs) < 0)
-               exit(-1);
+               exit(1);
 
 cleanup:
        string_list_clear(&tracking_srcs, 0);