Use --allow-empty for performance gelstudios/gitfiti#32
* Improves the size of the generated file: 2365211 new-gitfiti.sh 2529001 original-gitfiti.sh * Cutting the number of executed commands in half (no more echo) * Vastly reduces the amount of gc git performs during push
This commit is contained in:
@ -283,12 +283,10 @@ def generate_values_in_date_order(image, multiplier=1):
|
|||||||
|
|
||||||
def commit(content, commitdate):
|
def commit(content, commitdate):
|
||||||
template = (
|
template = (
|
||||||
'''echo {0} >> gitfiti\n'''
|
'''GIT_AUTHOR_DATE={0} GIT_COMMITTER_DATE={1} '''
|
||||||
'''GIT_AUTHOR_DATE={1} GIT_COMMITTER_DATE={2} '''
|
'''git commit --allow-empty -m "gitfiti" > /dev/null\n'''
|
||||||
'''git commit -a -m "gitfiti" > /dev/null\n'''
|
|
||||||
)
|
)
|
||||||
return template.format(content, commitdate.isoformat(),
|
return template.format(commitdate.isoformat(), commitdate.isoformat())
|
||||||
commitdate.isoformat())
|
|
||||||
|
|
||||||
|
|
||||||
def fake_it(image, start_date, username, repo, git_url, offset=0, multiplier=1):
|
def fake_it(image, start_date, username, repo, git_url, offset=0, multiplier=1):
|
||||||
|
Reference in New Issue
Block a user