@@ -9,52 +9,6 @@ use tempfile::{TempDir, tempdir};
99fn initialize ( repository : & str , branch : & str , pull_requests : & [ & str ] , patches : & [ & str ] ) -> TempDir {
1010 let temp_dir = tempdir ( ) . expect ( "tempdir failed" ) ;
1111
12- // Initialize git with an initial commit
13- Command :: new ( "git" )
14- . args ( [ "init" ] )
15- . current_dir ( temp_dir. path ( ) )
16- . output ( )
17- . expect ( "git init failed" ) ;
18-
19- // Create a file to commit (ensures we have something to commit)
20- std:: fs:: write (
21- temp_dir. path ( ) . join ( "README.md" ) ,
22- "# Test Repository\n \n This is a test repository for patchy tests." ,
23- )
24- . expect ( "writing README.md failed" ) ;
25-
26- // Configure git user for CI environment
27- Command :: new ( "git" )
28- . args ( [ "config" , "user.name" , "CI Test User" ] )
29- . current_dir ( temp_dir. path ( ) )
30- . output ( )
31- . expect ( "git config user.name failed" ) ;
32-
33- Command :: new ( "git" )
34- . args ( [ "config" , "user.email" , "[email protected] " ] ) 35- . current_dir ( temp_dir. path ( ) )
36- . output ( )
37- . expect ( "git config user.email failed" ) ;
38-
39- // Add and commit the README first
40- Command :: new ( "git" )
41- . args ( [ "add" , "README.md" ] )
42- . current_dir ( temp_dir. path ( ) )
43- . output ( )
44- . expect ( "git add README.md failed" ) ;
45-
46- Command :: new ( "git" )
47- . args ( [ "commit" , "-m" , "Initial commit with README" ] )
48- . current_dir ( temp_dir. path ( ) )
49- . output ( )
50- . expect ( "git commit failed" ) ;
51-
52- Command :: new ( "git" )
53- . args ( [ "init" ] )
54- . current_dir ( temp_dir. path ( ) )
55- . output ( )
56- . expect ( "git init failed" ) ;
57-
5812 copy_dir ( "tests/fixtures/patches" , temp_dir. path ( ) . join ( ".patchy" ) ) . expect ( "copy_dir failed" ) ;
5913
6014 std:: fs:: write (
0 commit comments