index
:
minetest.git
gpcf
lifo-fixes
release
modified minetest for gpcfs purposes
gpcf
about
summary
refs
log
tree
commit
diff
log msg
author
committer
range
path:
root
/
src
/
util
/
base64.cpp
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
#!/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
()
for
i
in
range
(
len
(
lines
)):
line
=
lines
[
i
]
if
line
.
startswith
(
"#"
)
or
" Translated using Weblate "
not in
line
:
continue
pos
=
line
.
rfind
(
"("
)
lang
=
line
[
pos
:]
author
=
line
[
line
.
find
(
"("
):
line
.
rfind
(
")"
,
0
,
pos
)+
1
]
# try to grab the next commit by the same author for the same language
for
j
in
range
(
i
+
1
,
len
(
lines
)):