Skip to content

FIx issue #464 corrupt log file #469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 2, 2016
Prev Previous commit
fix flake8 problems
  • Loading branch information
barry-scott committed Aug 1, 2016
commit d8ef023a5bab377764343c954bf453869def4807
6 changes: 3 additions & 3 deletions git/test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,13 +781,13 @@ def test_empty_repo(self, rw_dir):
nb = r.create_head('foo')
assert nb.is_valid()

with open( new_file_path, 'w' ) as f:
f.write( 'Line 1\n' )
with open(new_file_path, 'w') as f:
f.write('Line 1\n')

r.index.add([new_file_path])
r.index.commit("add line 1\nBAD MESSAGE 2\n")

with open( '%s/.git/logs/refs/heads/master' % (rw_dir,), 'r' ) as f:
with open('%s/.git/logs/refs/heads/master' % (rw_dir,), 'r') as f:
contents = f.read()

assert 'BAD MESSAGE' not in contents, 'log is corrupt'
Expand Down