@@ -9,9 +9,9 @@ rename from old-file.ts
99rename to new-file.ts` ;
1010
1111 const result = parseGitDiff ( diffContent ) ;
12-
12+
1313 assert . strictEqual ( result . files . length , 1 , 'Should parse one file' ) ;
14-
14+
1515 const file = result . files [ 0 ] ;
1616 assert . strictEqual ( file . path , 'new-file.ts' , 'Should have correct new path' ) ;
1717 assert . strictEqual ( file . originalPath , 'old-file.ts' , 'Should have correct original path' ) ;
@@ -27,9 +27,9 @@ index 0000000..abc123
2727+++ b/new-file.ts` ;
2828
2929 const result = parseGitDiff ( diffContent ) ;
30-
30+
3131 assert . strictEqual ( result . files . length , 1 , 'Should parse one file' ) ;
32-
32+
3333 const file = result . files [ 0 ] ;
3434 assert . strictEqual ( file . path , 'new-file.ts' , 'Should have correct path' ) ;
3535 assert . strictEqual ( file . originalPath , undefined , 'Should have no original path' ) ;
@@ -45,9 +45,9 @@ index abc123..0000000
4545+++ /dev/null` ;
4646
4747 const result = parseGitDiff ( diffContent ) ;
48-
48+
4949 assert . strictEqual ( result . files . length , 1 , 'Should parse one file' ) ;
50-
50+
5151 const file = result . files [ 0 ] ;
5252 assert . strictEqual ( file . path , 'dev/null' , 'Should have correct path' ) ;
5353 assert . strictEqual ( file . originalPath , 'old-file.ts' , 'Should have correct original path' ) ;
@@ -61,9 +61,9 @@ old mode 100644
6161new mode 100755` ;
6262
6363 const result = parseGitDiff ( diffContent ) ;
64-
64+
6565 assert . strictEqual ( result . files . length , 1 , 'Should parse one file' ) ;
66-
66+
6767 const file = result . files [ 0 ] ;
6868 assert . strictEqual ( file . path , 'script.sh' , 'Should have correct path' ) ;
6969 assert . strictEqual ( file . originalPath , undefined , 'Should have no original path' ) ;
@@ -77,9 +77,9 @@ index abc123..def456 100644
7777Binary files a/image.png and b/image.png differ` ;
7878
7979 const result = parseGitDiff ( diffContent ) ;
80-
80+
8181 assert . strictEqual ( result . files . length , 1 , 'Should parse one file' ) ;
82-
82+
8383 const file = result . files [ 0 ] ;
8484 assert . strictEqual ( file . path , 'image.png' , 'Should have correct path' ) ;
8585 assert . strictEqual ( file . originalPath , undefined , 'Should have no original path' ) ;
@@ -99,9 +99,9 @@ index abc123..def456 100644
9999 line 3` ;
100100
101101 const result = parseGitDiff ( diffContent ) ;
102-
102+
103103 assert . strictEqual ( result . files . length , 1 , 'Should parse one file' ) ;
104-
104+
105105 const file = result . files [ 0 ] ;
106106 assert . strictEqual ( file . path , 'file.ts' , 'Should have correct path' ) ;
107107 assert . strictEqual ( file . originalPath , undefined , 'Should have no original path' ) ;
@@ -124,16 +124,16 @@ index abc123..def456 100644
124124 line 2` ;
125125
126126 const result = parseGitDiff ( diffContent ) ;
127-
127+
128128 assert . strictEqual ( result . files . length , 2 , 'Should parse two files' ) ;
129-
129+
130130 // First file (rename)
131131 const renameFile = result . files [ 0 ] ;
132132 assert . strictEqual ( renameFile . path , 'new-file.ts' , 'Should have correct new path' ) ;
133133 assert . strictEqual ( renameFile . originalPath , 'old-file.ts' , 'Should have correct original path' ) ;
134134 assert . strictEqual ( renameFile . status , 'R' , 'Should have rename status' ) ;
135135 assert . strictEqual ( renameFile . hunks . length , 0 , 'Should have no hunks for pure rename' ) ;
136-
136+
137137 // Second file (regular change)
138138 const modifiedFile = result . files [ 1 ] ;
139139 assert . strictEqual ( modifiedFile . path , 'regular-file.ts' , 'Should have correct path' ) ;
0 commit comments