aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-06-14 13:26:59 +0800
committerfanquake <fanquake@gmail.com>2019-06-14 13:38:52 +0800
commit7524376a81a1955f4da4adb23005f2122b18a270 (patch)
tree647c47ee4dffd802850e7831aaa1536f0f500157 /contrib
parent431d81b61ca968da2d7c25f0d56455a44cd46fed (diff)
parent067fba56314f399674dd471c663e663040be52a3 (diff)
downloadbitcoin-7524376a81a1955f4da4adb23005f2122b18a270.tar.xz
Merge #16201: devtools: Always use unabbreviated commit IDs in github-merge.py
067fba563 devtools: Always use unabbreviated commit IDs in github-merge.py (Wladimir J. van der Laan) Pull request description: Always put the unabbreviated commit IDs in the generated commit messages and other places. This prevents the developer's `core.abbrev` git setting from leaking through and is better against ambiguity too. ACKs for commit 067fba: MarcoFalke: ACK 067fba56314f399674dd471c663e663040be52a3 (replaces `h` with `H`, didn't test) promag: ACK 067fba56314f399674dd471c663e663040be52a3, from the documentation https://git-scm.com/docs/pretty-formats: fanquake: ACK https://github.com/bitcoin/bitcoin/pull/16201/commits/067fba56314f399674dd471c663e663040be52a3. Tested by merging this PR into master, then merging a second PR ontop and checking that full commit hashes were being used. Also checked documentation linked to above. Did not check that this works when a different `core.abbrev` is set locally. Tree-SHA512: a851d10490cd8bcd8bca29094b08a6b9f883cfe1b0767ccda7ca789e4c8eff6260a4d82c33cb3d9bab01dd30ac8c9100cb7adbcb1911bb399d9385c1e1f15ecd
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/devtools/github-merge.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
index df1f3c8024..03179cec24 100755
--- a/contrib/devtools/github-merge.py
+++ b/contrib/devtools/github-merge.py
@@ -32,11 +32,11 @@ BASH = os.getenv('BASH','bash')
# OS specific configuration for terminal attributes
ATTR_RESET = ''
ATTR_PR = ''
-COMMIT_FORMAT = '%h %s (%an)%d'
+COMMIT_FORMAT = '%H %s (%an)%d'
if os.name == 'posix': # if posix, assume we can use basic terminal escapes
ATTR_RESET = '\033[0m'
ATTR_PR = '\033[1;36m'
- COMMIT_FORMAT = '%C(bold blue)%h%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset'
+ COMMIT_FORMAT = '%C(bold blue)%H%Creset %s %C(cyan)(%an)%Creset%C(green)%d%Creset'
def git_config_get(option, default=None):
'''
@@ -279,7 +279,7 @@ def main():
else:
firstline = 'Merge #%s' % (pull,)
message = firstline + '\n\n'
- message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%h %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
+ message += subprocess.check_output([GIT,'log','--no-merges','--topo-order','--pretty=format:%H %s (%an)',base_branch+'..'+head_branch]).decode('utf-8')
message += '\n\nPull request description:\n\n ' + body.replace('\n', '\n ') + '\n'
message += get_acks_from_comments(head_commit=subprocess.check_output([GIT,'log','-1','--pretty=format:%H',head_branch]).decode('utf-8')[:6], comments=comments)
try: