diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-08-02 05:47:27 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-08-02 05:47:27 +0200 |
commit | 83ebc659ace06c0e0822183263b2c10fe376a43e (patch) | |
tree | 4ded3dd300a5a6d02ce3c354af09dcf516b86bec /git/test/test_repo.py | |
parent | a4ad7cee0f8723226446a993d4f1f3b98e42583a (diff) | |
parent | df958981ad63edae6fceb69650c1fb9890c2b14f (diff) | |
download | gitpython-83ebc659ace06c0e0822183263b2c10fe376a43e.tar.gz |
Merge branch 'barry-scott-master'
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r-- | git/test/test_repo.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index 87887bad..48900c26 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -775,12 +775,23 @@ class TestRepo(TestBase): new_file_path = os.path.join(rw_dir, "new_file.ext") touch(new_file_path) r.index.add([new_file_path]) - r.index.commit("initial commit") + r.index.commit("initial commit\nBAD MESSAGE 1\n") # Now a branch should be creatable nb = r.create_head('foo') assert nb.is_valid() + 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: + contents = f.read() + + assert 'BAD MESSAGE' not in contents, 'log is corrupt' + def test_merge_base(self): repo = self.rorepo c1 = 'f6aa8d1' |