Skip to content

Commit

Permalink
attempt empty commit message, but got larger? maybe git version problem?
Browse files Browse the repository at this point in the history
  • Loading branch information
cirosantilli committed Apr 5, 2018
1 parent d17831a commit b5b2b98
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions other-test-repos/many-commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,35 @@

import util

email = b'ciro.santili@gmail.com'
name = b'Ciro Santilli'
email = b'a@a.com'
name = b''

util.init()

tree = util.create_tree_with_one_file()
commit = None
n = 1000000
percent = (n / 100)
p = 0
for i in range(n):
now = int(time.time())
commit, _, _ = util.save_commit_object(
tree,
(commit,),
author_date_s=now,
author_date_s=0,
author_email=email,
author_name=name,
committer_date_s=now,
committer_date_s=0,
committer_email=email,
committer_name=name,
message=(str(i).encode('ascii')),
message=b'',
)
if i % percent == 0:
print(p)
if i % 100000 == 0:
print(i)
print(datetime.datetime.now())
p += 1

# Lose objects are too large and blow up the tmpfs.

# Does clean packets, but the calculation takes more and more memory,
# and slows down and blows up at the end. TODO which subcommand blows up eactly?.
#subprocess.check_output(['git', 'gc'])

subprocess.check_output(['git', 'repack'])
subprocess.check_output(['git', 'prune-packed'])

subprocess.check_output(['git', 'tag', str(p), commit])
subprocess.check_output(['git', 'tag', str(i), commit])
util.create_master(commit)

0 comments on commit b5b2b98

Please sign in to comment.