mirror of
https://github.com/Dev-Wiki/git-repo.git
synced 2025-12-14 00:24:05 +08:00
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>
This commit is contained in:
@@ -635,7 +635,7 @@ later is required to fix a server side protocol bug.
|
||||
print('Failed to remove %s (%s)' % (os.path.join(path, '.git'), str(e)), file=sys.stderr)
|
||||
print('error: Failed to delete obsolete path %s' % path, file=sys.stderr)
|
||||
print(' remove manually, then run sync again', file=sys.stderr)
|
||||
return -1
|
||||
return 1
|
||||
|
||||
# Delete everything under the worktree, except for directories that contain
|
||||
# another git project
|
||||
@@ -669,7 +669,7 @@ later is required to fix a server side protocol bug.
|
||||
if failed:
|
||||
print('error: Failed to delete obsolete path %s' % path, file=sys.stderr)
|
||||
print(' remove manually, then run sync again', file=sys.stderr)
|
||||
return -1
|
||||
return 1
|
||||
|
||||
# Try deleting parent dirs if they are empty
|
||||
project_dir = path
|
||||
@@ -726,9 +726,9 @@ later is required to fix a server side protocol bug.
|
||||
'are present' % project.relpath, file=sys.stderr)
|
||||
print(' commit changes, then run sync again',
|
||||
file=sys.stderr)
|
||||
return -1
|
||||
return 1
|
||||
elif self._DeleteProject(project.worktree):
|
||||
return -1
|
||||
return 1
|
||||
|
||||
new_project_paths.sort()
|
||||
fd = open(file_path, 'w')
|
||||
|
||||
Reference in New Issue
Block a user