File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -775,12 +775,23 @@ def test_empty_repo(self, rw_dir):
775
775
new_file_path = os .path .join (rw_dir , "new_file.ext" )
776
776
touch (new_file_path )
777
777
r .index .add ([new_file_path ])
778
- r .index .commit ("initial commit" )
778
+ r .index .commit ("initial commit\n BAD MESSAGE 1 \n " )
779
779
780
780
# Now a branch should be creatable
781
781
nb = r .create_head ('foo' )
782
782
assert nb .is_valid ()
783
783
784
+ with open ( new_file_path , 'w' ) as f :
785
+ f .write ( 'Line 1\n ' )
786
+
787
+ r .index .add ([new_file_path ])
788
+ r .index .commit ("add line 1\n BAD MESSAGE 2\n " )
789
+
790
+ with open ( '%s/.git/logs/refs/heads/master' % (rw_dir ,), 'r' ) as f :
791
+ contents = f .read ()
792
+
793
+ assert 'BAD MESSAGE' not in contents , 'log is corrupt'
794
+
784
795
def test_merge_base (self ):
785
796
repo = self .rorepo
786
797
c1 = 'f6aa8d1'
You can’t perform that action at this time.
0 commit comments