Skip to content

Commit 09f5180

Browse files
Felix ObenhuberMatthias Putz
authored andcommitted
Fix: fixed push subcmd and aligned to push
1 parent 5f859eb commit 09f5180

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

subcmds/push.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,15 @@ def Execute(self, opt, args):
376376
if avail:
377377
pending.append((project, avail))
378378

379-
if pending and (not opt.bypass_hooks):
379+
if not pending:
380+
print("no branches ready for upload", file=sys.stderr)
381+
return
382+
383+
if not opt.bypass_hooks:
380384
hook = RepoHook('pre-push', self.manifest.repo_hooks_project,
381-
self.manifest.topdir, abort_if_user_denies=True)
385+
self.manifest.topdir,
386+
self.manifest.manifestProject.GetRemote('origin').url,
387+
abort_if_user_denies=True)
382388
pending_proj_names = [project.name for (project, avail) in pending]
383389
pending_worktrees = [project.worktree for (project, avail) in pending]
384390
try:

0 commit comments

Comments
 (0)