Skip to content

Commit

Permalink
A more efficient way of running a limited num of commits!
Browse files Browse the repository at this point in the history
Using git commit --depth={MAX_NUM_ITERATIONS}
(issue fonttools#1241)
  • Loading branch information
felipesanches committed Apr 5, 2017
1 parent c8cc74b commit 7cfb506
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,13 @@ def run_fontbakery_on_commit(fonts_dir, fonts_prefix, commit, i):

def perform_job(fonts_dir, fonts_prefix):
global db
clone(REPO_URL, "clonedir")
clone(REPO_URL, "clonedir", depth=MAX_NUM_ITERATIONS)
os.chdir("clonedir")
run(["git", "checkout", "master"])
print ("We're now at master branch.")

lines = run(["git", "log", "--oneline", "."]).strip().split('\n')
commits = ["master"] + [line.split()[0].strip() for line in lines]
commits = commits[:MAX_NUM_ITERATIONS]
print ("The commits we'll iterate over are: {}".format(commits))

db_host = os.environ.get("RETHINKDB_DRIVER_SERVICE_HOST", 'db')
Expand Down

0 comments on commit 7cfb506

Please sign in to comment.