summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Choo <chooglen@google.com>2022-03-29 20:01:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-30 23:45:05 (GMT)
commit5391e94813418dfb5ccc4c2f1d8518995b4f3ca5 (patch)
treeeb659fb3e2c77675a9c773a4938f77b3194203ac
parentac59c742de5f548ed07735fb212cc87129383bcd (diff)
downloadgit-5391e94813418dfb5ccc4c2f1d8518995b4f3ca5.zip
git-5391e94813418dfb5ccc4c2f1d8518995b4f3ca5.tar.gz
git-5391e94813418dfb5ccc4c2f1d8518995b4f3ca5.tar.bz2
branch: remove negative exit code
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>
-rw-r--r--branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/branch.c b/branch.c
index add6a37..ed6f993 100644
--- 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);