@@ -179,6 +179,14 @@ def add_bad_blob():
179179 except Exception as ex :
180180 assert "index.lock' could not be obtained" not in str (ex )
181181
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+ )
182190 @with_rw_repo ("0.1.6" )
183191 def test_index_file_from_tree (self , rw_repo ):
184192 common_ancestor_sha = "5117c9c8a4d3af19a9958677e45cda9269de1541"
@@ -229,6 +237,14 @@ def test_index_file_from_tree(self, rw_repo):
229237 # END for each blob
230238 self .assertEqual (num_blobs , len (three_way_index .entries ))
231239
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+ )
232248 @with_rw_repo ("0.1.6" )
233249 def test_index_merge_tree (self , rw_repo ):
234250 # 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):
291307 self .assertEqual (len (unmerged_blobs ), 1 )
292308 self .assertEqual (list (unmerged_blobs .keys ())[0 ], manifest_key [0 ])
293309
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+ )
294318 @with_rw_repo ("0.1.6" )
295319 def test_index_file_diffing (self , rw_repo ):
296320 # Default Index instance points to our index.
@@ -425,6 +449,14 @@ def _count_existing(self, repo, files):
425449
426450 # END num existing helper
427451
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+ )
428460 @with_rw_repo ("0.1.6" )
429461 def test_index_mutation (self , rw_repo ):
430462 index = rw_repo .index
@@ -778,6 +810,14 @@ def make_paths():
778810 for absfile in absfiles :
779811 assert osp .isfile (absfile )
780812
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+ )
781821 @with_rw_repo ("HEAD" )
782822 def test_compare_write_tree (self , rw_repo ):
783823 """Test writing all trees, comparing them for equality."""
0 commit comments