aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-11-05 12:33:25 +0100
committerMartin Liska <mliska@suse.cz>2020-11-06 13:33:41 +0100
commitf176773bc27580570be505938439458a3a9d41d5 (patch)
tree3149ff86866034887352d98d0e15f3ceb307666a /contrib/gcc-changelog/git_commit.py
parentb88fdcc1c3675330031b0cff35ecf14b53616321 (diff)
downloadgcc-f176773bc27580570be505938439458a3a9d41d5.zip
gcc-f176773bc27580570be505938439458a3a9d41d5.tar.gz
gcc-f176773bc27580570be505938439458a3a9d41d5.tar.bz2
gcc-changelog: prevent double cherry-pick line
contrib/ChangeLog: * gcc-changelog/git_commit.py: Add new check. * gcc-changelog/test_email.py: Test it. * gcc-changelog/test_patches.txt: Add new patch.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 0008865..80ae0b2 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -423,7 +423,11 @@ class GitCommit:
continue
elif line.startswith(CHERRY_PICK_PREFIX):
commit = line[len(CHERRY_PICK_PREFIX):].rstrip(')')
- self.cherry_pick_commit = commit
+ if self.cherry_pick_commit:
+ self.errors.append(Error('multiple cherry pick lines',
+ line))
+ else:
+ self.cherry_pick_commit = commit
continue
# ChangeLog name will be deduced later