@@ -179,6 +179,14 @@ def add_bad_blob():
179
179
except Exception as ex :
180
180
assert "index.lock' could not be obtained" not in str (ex )
181
181
182
+ @pytest .mark .xfail (
183
+ os .name == "nt" ,
184
+ reason = (
185
+ "IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n "
186
+ "'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
187
+ ),
188
+ raises = GitCommandError ,
189
+ )
182
190
@with_rw_repo ("0.1.6" )
183
191
def test_index_file_from_tree (self , rw_repo ):
184
192
common_ancestor_sha = "5117c9c8a4d3af19a9958677e45cda9269de1541"
@@ -229,6 +237,14 @@ def test_index_file_from_tree(self, rw_repo):
229
237
# END for each blob
230
238
self .assertEqual (num_blobs , len (three_way_index .entries ))
231
239
240
+ @pytest .mark .xfail (
241
+ os .name == "nt" ,
242
+ reason = (
243
+ "IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n "
244
+ "'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
245
+ ),
246
+ raises = GitCommandError ,
247
+ )
232
248
@with_rw_repo ("0.1.6" )
233
249
def test_index_merge_tree (self , rw_repo ):
234
250
# A bit out of place, but we need a different repo for this:
@@ -291,6 +307,14 @@ def test_index_merge_tree(self, rw_repo):
291
307
self .assertEqual (len (unmerged_blobs ), 1 )
292
308
self .assertEqual (list (unmerged_blobs .keys ())[0 ], manifest_key [0 ])
293
309
310
+ @pytest .mark .xfail (
311
+ os .name == "nt" ,
312
+ reason = (
313
+ "IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n "
314
+ "'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
315
+ ),
316
+ raises = GitCommandError ,
317
+ )
294
318
@with_rw_repo ("0.1.6" )
295
319
def test_index_file_diffing (self , rw_repo ):
296
320
# Default Index instance points to our index.
@@ -425,6 +449,14 @@ def _count_existing(self, repo, files):
425
449
426
450
# END num existing helper
427
451
452
+ @pytest .mark .xfail (
453
+ os .name == "nt" ,
454
+ reason = (
455
+ "IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n "
456
+ "'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
457
+ ),
458
+ raises = GitCommandError ,
459
+ )
428
460
@with_rw_repo ("0.1.6" )
429
461
def test_index_mutation (self , rw_repo ):
430
462
index = rw_repo .index
@@ -778,6 +810,14 @@ def make_paths():
778
810
for absfile in absfiles :
779
811
assert osp .isfile (absfile )
780
812
813
+ @pytest .mark .xfail (
814
+ os .name == "nt" ,
815
+ reason = (
816
+ "IndexFile.from_tree is broken on Windows (related to NamedTemporaryFile), see #1630.\n "
817
+ "'git read-tree --index-output=...' fails with 'fatal: unable to write new index file'."
818
+ ),
819
+ raises = GitCommandError ,
820
+ )
781
821
@with_rw_repo ("HEAD" )
782
822
def test_compare_write_tree (self , rw_repo ):
783
823
"""Test writing all trees, comparing them for equality."""
0 commit comments