diff options
author | Mike Frysinger <vapier@google.com> | 2019-08-07 17:19:24 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2019-08-08 05:07:31 +0000 |
commit | a850ca2712b61cd820a9138c9e97f3fbb583e509 (patch) | |
tree | 0ba9843537bec95dd6d7cdfbbb644faba72e27e0 /subcmds/rebase.py | |
parent | a34186e4813170f3c71ec51c740cd571c79e12b5 (diff) | |
download | git-repo-a850ca2712b61cd820a9138c9e97f3fbb583e509.tar.gz |
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 <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/rebase.py')
-rw-r--r-- | subcmds/rebase.py | 12 |
1 files changed, 6 insertions, 6 deletions
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. | |||
71 | if len(args) == 1: | 71 | if len(args) == 1: |
72 | print('note: project %s is mapped to more than one path' % (args[0],), | 72 | print('note: project %s is mapped to more than one path' % (args[0],), |
73 | file=sys.stderr) | 73 | file=sys.stderr) |
74 | return -1 | 74 | return 1 |
75 | 75 | ||
76 | for project in all_projects: | 76 | for project in all_projects: |
77 | cb = project.CurrentBranch | 77 | cb = project.CurrentBranch |
@@ -79,7 +79,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
79 | if one_project: | 79 | if one_project: |
80 | print("error: project %s has a detached HEAD" % project.relpath, | 80 | print("error: project %s has a detached HEAD" % project.relpath, |
81 | file=sys.stderr) | 81 | file=sys.stderr) |
82 | return -1 | 82 | return 1 |
83 | # ignore branches with detatched HEADs | 83 | # ignore branches with detatched HEADs |
84 | continue | 84 | continue |
85 | 85 | ||
@@ -88,7 +88,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
88 | if one_project: | 88 | if one_project: |
89 | print("error: project %s does not track any remote branches" | 89 | print("error: project %s does not track any remote branches" |
90 | % project.relpath, file=sys.stderr) | 90 | % project.relpath, file=sys.stderr) |
91 | return -1 | 91 | return 1 |
92 | # ignore branches without remotes | 92 | # ignore branches without remotes |
93 | continue | 93 | continue |
94 | 94 | ||
@@ -131,13 +131,13 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
131 | stash_args = ["stash"] | 131 | stash_args = ["stash"] |
132 | 132 | ||
133 | if GitCommand(project, stash_args).Wait() != 0: | 133 | if GitCommand(project, stash_args).Wait() != 0: |
134 | return -1 | 134 | return 1 |
135 | 135 | ||
136 | if GitCommand(project, args).Wait() != 0: | 136 | if GitCommand(project, args).Wait() != 0: |
137 | return -1 | 137 | return 1 |
138 | 138 | ||
139 | if needs_stash: | 139 | if needs_stash: |
140 | stash_args.append('pop') | 140 | stash_args.append('pop') |
141 | stash_args.append('--quiet') | 141 | stash_args.append('--quiet') |
142 | if GitCommand(project, stash_args).Wait() != 0: | 142 | if GitCommand(project, stash_args).Wait() != 0: |
143 | return -1 | 143 | return 1 |