summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-06-19 20:17:38 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-11-23 10:53:45 +0000
commitc71727be9070c02b2908fce75daedc76fb3182db (patch)
treedfb939a36aa46e4215df71120943bd3a3e57d40c
parent3dc44d7513cb6934019df4225ded41be182f5ea1 (diff)
gpush: be a bit less aggressive about marking changes as drafts
in particular, don't do it for "WIP", as most people expect these changes to be visible. so now only obvious "garbage subjects" are marked. Change-Id: I1704e56208a87f42941332773fce18b7c79abbbc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
-rwxr-xr-xbin/git-gpush9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/git-gpush b/bin/git-gpush
index 3da3ac4..cded2fa 100755
--- a/bin/git-gpush
+++ b/bin/git-gpush
@@ -45,11 +45,12 @@ Description:
Options:
-d, --draft
Mark the pushed Changes as drafts. This switch is usually
- unnecessary, as gpush will recognize WIP Changes by subject.
+ unnecessary, as gpush will recognize drafts by "***" in the
+ subject. Note that "WIP" is specifically NOT a draft indicator.
-p, --publish
- Do not mark the pushed Changes as drafts even if they have
- WIP markers.
+ Do not mark the pushed Changes as drafts even if they have a
+ draft indicator.
-r, --remote
Specify the git remote to push to.
@@ -505,7 +506,7 @@ sub push_patches()
{
if (!$draft) {
$_ = read_cmd_line(0, 'git', 'log', '--pretty=%s', '-1', $ref_from);
- $draft = 1 if (/\bWIP\b|\*{3}|^(.)\1*$/i);
+ $draft = 1 if (/\*{3}|^(.)\1*$/i);
}
print "Pushing $ref_from for $ref_to on $remote ...\n" if (!$quiet);