aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-03-02 23:05:29 +0100
committerMarcoFalke <falke.marco@gmail.com>2017-03-03 15:16:10 +0100
commitfa7da3fd965bc344fd46d263919d5b481332de0c (patch)
tree69b73bc43ec535f99b4ef52ad4e7d227425ba8f2 /contrib/devtools
parent65d90f585a83c5fd77bc87cb86731c1ae6e22684 (diff)
downloadbitcoin-fa7da3fd965bc344fd46d263919d5b481332de0c.tar.xz
[contrib] gh-merge: Move second sha512 check to before signing
Diffstat (limited to 'contrib/devtools')
-rwxr-xr-xcontrib/devtools/github-merge.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
index bb6ffb0253..bea012d556 100755
--- a/contrib/devtools/github-merge.py
+++ b/contrib/devtools/github-merge.py
@@ -212,10 +212,6 @@ def main():
except subprocess.CalledProcessError as e:
printf("ERROR: Cannot update message.",file=stderr)
exit(4)
- second_sha512 = tree_sha512sum()
- if first_sha512 != second_sha512:
- print("ERROR: Tree hash changed unexpectedly",file=stderr)
- exit(4)
print('%s#%s%s %s %sinto %s%s' % (ATTR_RESET+ATTR_PR,pull,ATTR_RESET,title,ATTR_RESET+ATTR_PR,branch,ATTR_RESET))
subprocess.check_call([GIT,'log','--graph','--topo-order','--pretty=format:'+COMMIT_FORMAT,base_branch+'..'+head_branch])
@@ -258,6 +254,11 @@ def main():
print("ERROR: Merge rejected.",file=stderr)
exit(7)
+ second_sha512 = tree_sha512sum()
+ if first_sha512 != second_sha512:
+ print("ERROR: Tree hash changed unexpectedly",file=stderr)
+ exit(8)
+
# Sign the merge commit.
reply = ask_prompt("Type 's' to sign off on the merge.")
if reply == 's':