summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-22 20:03:59 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:44:11 (GMT)
commit4161ddb31b8b8f89ed552ca02bf7ecce42663da2 (patch)
treec87af41de58c77f8d70b7728dfacecc7849ed739
parentad97a8dd315e084ebac3a36338cf888dd0d26e48 (diff)
kajonggtest: accept any length for commit ids
-rwxr-xr-xsrc/kajonggtest.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/kajonggtest.py b/src/kajonggtest.py
index 30084cf..868be4f 100755
--- a/src/kajonggtest.py
+++ b/src/kajonggtest.py
@@ -373,9 +373,13 @@ def onlyExistingCommits(commits):
for branch in subprocess.check_output(b'git branch'.split()).decode().split('\n'):
if 'detached' not in branch and 'no branch' not in branch:
KNOWNCOMMITS |= set(subprocess.check_output(
- 'git log --max-count=200 --pretty=%h {branch}'.format(
+ 'git log --max-count=200 --pretty=%H {branch}'.format(
branch=branch[2:]).split()).decode().split('\n'))
- return list(x for x in commits if x in KNOWNCOMMITS)
+ result = list()
+ for commit in commits:
+ if any(x.startswith(commit) for x in KNOWNCOMMITS):
+ result.append(commit)
+ return result
def removeInvalidCommits(csvFile):