Skip to content

Commit 8276d33

Browse files
committed
For --dry-run at least print a summary
Using -v is overkill for a script. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- v2 - move summary out of the finally step
1 parent 12753e3 commit 8276d33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

git-publish

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,12 @@ branch.%s.pushRemote is set appropriately? (Override with --no-check-url)''' %
962962
git_send_email(to, cc, selected_patches, suppress_cc, options.in_reply_to, options.thread,
963963
send_email_args=options.send_email_args,
964964
dry_run=options.dry_run)
965+
966+
if options.dry_run:
967+
npatches = len(selected_patches)
968+
npeople = len(to) + len(cc)
969+
print(f"Would have sent of {npatches} patches to {npeople} people")
970+
965971
except (GitSendEmailError, GitHookError, InspectEmailsError):
966972
return 1
967973
except GitError as e:

0 commit comments

Comments
 (0)