Skip to content

Commit b429a1a

Browse files
authored
Merge pull request #427 from online-judge-tools/fix/git-pull-first
git pull first
2 parents 18f853d + ca3485d commit b429a1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

onlinejudge_verify/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ def push_timestamp_to_branch() -> None:
9898
subprocess.check_call(['git', 'config', '--global', 'user.name', 'GitHub'])
9999
subprocess.check_call(['git', 'config', '--global', 'user.email', '[email protected]'])
100100
path = onlinejudge_verify.marker.get_verification_marker().json_path
101-
logger.info('$ git add %s && git commit && git push', str(path))
101+
logger.info('$ git pull && git add %s && git commit && git push', str(path))
102+
subprocess.check_call(['git', 'pull'])
102103
if path.exists():
103104
subprocess.check_call(['git', 'add', str(path)])
104105
if subprocess.run(['git', 'diff', '--quiet', '--staged'], check=False).returncode:

0 commit comments

Comments
 (0)