Skip to content

Instantly share code, notes, and snippets.

@makuk66
Created May 17, 2016 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makuk66/bf397d27a2b2d67a58f60c9c171bc4d4 to your computer and use it in GitHub Desktop.
Save makuk66/bf397d27a2b2d67a58f60c9c171bc4d4 to your computer and use it in GitHub Desktop.
# quick and dirty script to split the output of "git log" into separate files for Fusion to index.
writer=None
with open('gitlog', 'r') as f:
for line in f:
if line.startswith('commit '):
(word, commit) = line.strip().split(' ')
if writer != None:
writer.close()
writer = open('data/' + commit + '.txt', 'w')
writer.write(line)
if writer != None:
writer.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment