From a850ca2712b61cd820a9138c9e97f3fbb583e509 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 7 Aug 2019 17:19:24 -0400 Subject: rebase/sync: use exit(1) for errors instead of exit(-1) Callers don't actually see -1 (they'll usually see 255, but the exact answer here is complicated). Just switch to 1 as that's the standard value tools use to indicate an error. Change-Id: Ib712db1924bc3e5f7920bafd7bb5fb61f3bda44f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/233553 Reviewed-by: David Pursehouse Tested-by: Mike Frysinger --- subcmds/rebase.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'subcmds/rebase.py') diff --git a/subcmds/rebase.py b/subcmds/rebase.py index 9464091f..9d4b1672 100644 --- a/subcmds/rebase.py +++ b/subcmds/rebase.py @@ -71,7 +71,7 @@ branch but need to incorporate new upstream changes "underneath" them. if len(args) == 1: print('note: project %s is mapped to more than one path' % (args[0],), file=sys.stderr) - return -1 + return 1 for project in all_projects: cb = project.CurrentBranch @@ -79,7 +79,7 @@ branch but need to incorporate new upstream changes "underneath" them. if one_project: print("error: project %s has a detached HEAD" % project.relpath, file=sys.stderr) - return -1 + return 1 # ignore branches with detatched HEADs continue @@ -88,7 +88,7 @@ branch but need to incorporate new upstream changes "underneath" them. if one_project: print("error: project %s does not track any remote branches" % project.relpath, file=sys.stderr) - return -1 + return 1 # ignore branches without remotes continue @@ -131,13 +131,13 @@ branch but need to incorporate new upstream changes "underneath" them. stash_args = ["stash"] if GitCommand(project, stash_args).Wait() != 0: - return -1 + return 1 if GitCommand(project, args).Wait() != 0: - return -1 + return 1 if needs_stash: stash_args.append('pop') stash_args.append('--quiet') if GitCommand(project, stash_args).Wait() != 0: - return -1 + return 1 -- cgit v1.2.3-54-g00ecf