blob: 465cf0b9394448f334f2fee34726b0fe22355337 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/usr/bin/env python3
import sys
import subprocess
ret = subprocess.run(["git", "config", "rebase.instructionFormat"], capture_output=True)
if ret.returncode != 0 or ret.stdout.decode('ascii').strip() != "(%an <%ae>) %s":
print("Git is using the wrong rebase instruction format, reconfigure it.")
exit(1)
try:
f = open(".git/rebase-merge/git-rebase-todo", "r")
except:
print("Initiate the rebase first!")
exit(1)
lines = list(s.strip("\r\n") for s in f.readlines())
f.close()
|