@@ -95,47 +95,20 @@ mod find_youngest_matching_commit {
9595 fn regex_matches ( ) {
9696 let repo = repo ( "complex_graph" ) . unwrap ( ) ;
9797
98- // The full Linux CI `test` job regenerates baselines instead of taking them from archives.
99- // Traversal order with `:/` is broken in Git 2.47.*, so some `parse_spec` assertions fail.
100- // The fix is in Git 2.48.* but is not backported. For now, we use `parse_spec_no_baseline`
101- // in affected test cases when they are run on CI with Git 2.47.*. For details, see:
102- //
103- // - https://lore.kernel.org/git/Z1LJSADiStlFicTL@pks.im/T/
104- // - https://lore.kernel.org/git/Z1LtS-8f8WZyobz3@pks.im/T/
105- // - https://github.com/git/git/blob/v2.48.0/Documentation/RelNotes/2.48.0.txt#L294-L296
106- // - https://github.com/GitoxideLabs/gitoxide/issues/1622
107- let skip_some_baselines = is_ci:: cached ( )
108- && std:: env:: var_os ( "GIX_TEST_IGNORE_ARCHIVES" ) . is_some ( )
109- && ( ( 2 , 47 , 0 ) ..( 2 , 48 , 0 ) ) . contains ( & gix_testtools:: GIT_VERSION ) ;
110-
111- if skip_some_baselines {
112- assert_eq ! (
113- parse_spec_no_baseline( ":/mes.age" , & repo) . unwrap( ) ,
114- Spec :: from_id( hex_to_id( "ef80b4b77b167f326351c93284dc0eb00dd54ff4" ) . attach( & repo) )
115- ) ;
116- } else {
117- assert_eq ! (
118- parse_spec( ":/mes.age" , & repo) . unwrap( ) ,
119- Spec :: from_id( hex_to_id( "ef80b4b77b167f326351c93284dc0eb00dd54ff4" ) . attach( & repo) )
120- ) ;
121- }
98+ assert_eq ! (
99+ parse_spec( ":/mes.age" , & repo) . unwrap( ) ,
100+ Spec :: from_id( hex_to_id( "ef80b4b77b167f326351c93284dc0eb00dd54ff4" ) . attach( & repo) )
101+ ) ;
122102
123103 assert_eq ! (
124104 parse_spec( ":/not there" , & repo) . unwrap_err( ) . to_string( ) ,
125105 "None of 10 commits reached from all references matched regex \" not there\" "
126106 ) ;
127107
128- if skip_some_baselines {
129- assert_eq ! (
130- parse_spec_no_baseline( ":/!-message" , & repo) . unwrap( ) ,
131- Spec :: from_id( hex_to_id( "55e825ebe8fd2ff78cad3826afb696b96b576a7e" ) . attach( & repo) )
132- ) ;
133- } else {
134- assert_eq ! (
135- parse_spec( ":/!-message" , & repo) . unwrap( ) ,
136- Spec :: from_id( hex_to_id( "55e825ebe8fd2ff78cad3826afb696b96b576a7e" ) . attach( & repo) )
137- ) ;
138- }
108+ assert_eq ! (
109+ parse_spec( ":/!-message" , & repo) . unwrap( ) ,
110+ Spec :: from_id( hex_to_id( "55e825ebe8fd2ff78cad3826afb696b96b576a7e" ) . attach( & repo) )
111+ ) ;
139112
140113 assert_eq ! (
141114 parse_spec( "@^{/!-B}" , & repo) . unwrap( ) ,
0 commit comments