@@ -739,20 +739,22 @@ def test_commit_msg_legacy(commit_msg_repo, tempdir_factory, store):
739739
740740def test_post_commit_integration (tempdir_factory , store ):
741741 path = git_dir (tempdir_factory )
742- config = [
743- {
744- 'repo' : 'local' ,
745- 'hooks' : [{
746- 'id' : 'post-commit' ,
747- 'name' : 'Post commit' ,
748- 'entry' : 'touch post-commit.tmp' ,
749- 'language' : 'system' ,
750- 'always_run' : True ,
751- 'verbose' : True ,
752- 'stages' : ['post-commit' ],
753- }],
754- },
755- ]
742+ config = {
743+ 'repos' : [
744+ {
745+ 'repo' : 'local' ,
746+ 'hooks' : [{
747+ 'id' : 'post-commit' ,
748+ 'name' : 'Post commit' ,
749+ 'entry' : 'touch post-commit.tmp' ,
750+ 'language' : 'system' ,
751+ 'always_run' : True ,
752+ 'verbose' : True ,
753+ 'stages' : ['post-commit' ],
754+ }],
755+ },
756+ ],
757+ }
756758 write_config (path , config )
757759 with cwd (path ):
758760 _get_commit_output (tempdir_factory )
@@ -765,20 +767,22 @@ def test_post_commit_integration(tempdir_factory, store):
765767
766768def test_post_merge_integration (tempdir_factory , store ):
767769 path = git_dir (tempdir_factory )
768- config = [
769- {
770- 'repo' : 'local' ,
771- 'hooks' : [{
772- 'id' : 'post-merge' ,
773- 'name' : 'Post merge' ,
774- 'entry' : 'touch post-merge.tmp' ,
775- 'language' : 'system' ,
776- 'always_run' : True ,
777- 'verbose' : True ,
778- 'stages' : ['post-merge' ],
779- }],
780- },
781- ]
770+ config = {
771+ 'repos' : [
772+ {
773+ 'repo' : 'local' ,
774+ 'hooks' : [{
775+ 'id' : 'post-merge' ,
776+ 'name' : 'Post merge' ,
777+ 'entry' : 'touch post-merge.tmp' ,
778+ 'language' : 'system' ,
779+ 'always_run' : True ,
780+ 'verbose' : True ,
781+ 'stages' : ['post-merge' ],
782+ }],
783+ },
784+ ],
785+ }
782786 write_config (path , config )
783787 with cwd (path ):
784788 # create a simple diamond of commits for a non-trivial merge
@@ -807,20 +811,22 @@ def test_post_merge_integration(tempdir_factory, store):
807811
808812def test_post_rewrite_integration (tempdir_factory , store ):
809813 path = git_dir (tempdir_factory )
810- config = [
811- {
812- 'repo' : 'local' ,
813- 'hooks' : [{
814- 'id' : 'post-rewrite' ,
815- 'name' : 'Post rewrite' ,
816- 'entry' : 'touch post-rewrite.tmp' ,
817- 'language' : 'system' ,
818- 'always_run' : True ,
819- 'verbose' : True ,
820- 'stages' : ['post-rewrite' ],
821- }],
822- },
823- ]
814+ config = {
815+ 'repos' : [
816+ {
817+ 'repo' : 'local' ,
818+ 'hooks' : [{
819+ 'id' : 'post-rewrite' ,
820+ 'name' : 'Post rewrite' ,
821+ 'entry' : 'touch post-rewrite.tmp' ,
822+ 'language' : 'system' ,
823+ 'always_run' : True ,
824+ 'verbose' : True ,
825+ 'stages' : ['post-rewrite' ],
826+ }],
827+ },
828+ ],
829+ }
824830 write_config (path , config )
825831 with cwd (path ):
826832 open ('init' , 'a' ).close ()
@@ -836,21 +842,23 @@ def test_post_rewrite_integration(tempdir_factory, store):
836842
837843def test_post_checkout_integration (tempdir_factory , store ):
838844 path = git_dir (tempdir_factory )
839- config = [
840- {
841- 'repo' : 'local' ,
842- 'hooks' : [{
843- 'id' : 'post-checkout' ,
844- 'name' : 'Post checkout' ,
845- 'entry' : 'bash -c "echo ${PRE_COMMIT_TO_REF}"' ,
846- 'language' : 'system' ,
847- 'always_run' : True ,
848- 'verbose' : True ,
849- 'stages' : ['post-checkout' ],
850- }],
851- },
852- {'repo' : 'meta' , 'hooks' : [{'id' : 'identity' }]},
853- ]
845+ config = {
846+ 'repos' : [
847+ {
848+ 'repo' : 'local' ,
849+ 'hooks' : [{
850+ 'id' : 'post-checkout' ,
851+ 'name' : 'Post checkout' ,
852+ 'entry' : 'bash -c "echo ${PRE_COMMIT_TO_REF}"' ,
853+ 'language' : 'system' ,
854+ 'always_run' : True ,
855+ 'verbose' : True ,
856+ 'stages' : ['post-checkout' ],
857+ }],
858+ },
859+ {'repo' : 'meta' , 'hooks' : [{'id' : 'identity' }]},
860+ ],
861+ }
854862 write_config (path , config )
855863 with cwd (path ):
856864 cmd_output ('git' , 'add' , '.' )
0 commit comments