Skip to content

Commit

Permalink
Merge pull request #21 from Dakkaron/master
Browse files Browse the repository at this point in the history
Greatly improved speed
  • Loading branch information
angusshire authored May 20, 2019
2 parents d736caf + 061a010 commit f9ec68a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions greenhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from datetime import date, timedelta
from random import randint
from time import sleep
import sys
import subprocess
import os
Expand All @@ -29,8 +28,7 @@ def main(argv):
curdate = get_date_string(i, startdate)
num_commits = randint(1, 10)
for commit in range(0, num_commits):
subprocess.call("echo '" + curdate + str(randint(0, 1000000)) +"' > realwork.txt; git add realwork.txt; GIT_AUTHOR_DATE='" + curdate + "' GIT_COMMITTER_DATE='" + curdate + "' git commit -m 'update'; git push;", shell=True)
sleep(.5)
subprocess.call("echo '" + curdate + str(randint(0, 1000000)) +"' > realwork.txt; sync; git add realwork.txt; GIT_AUTHOR_DATE='" + curdate + "' GIT_COMMITTER_DATE='" + curdate + "' git commit -m 'update'", shell=True)
i += 1
subprocess.call("git rm realwork.txt; git commit -m 'delete'; git push;", shell=True)

Expand Down

0 comments on commit f9ec68a

Please sign in to comment.