@@ -338,7 +338,7 @@ class Remote(LazyMixin, Iterable):
338338 NOTE: When querying configuration, the configuration accessor will be cached
339339 to speed up subsequent accesses."""
340340
341- __slots__ = ("repo" ,"name" ,"_config_reader" , "fetch_no" )
341+ __slots__ = ("repo" ,"name" ,"_config_reader" )
342342_id_attribute_ = "name"
343343
344344def __init__ (self ,repo ,name ):
@@ -348,7 +348,6 @@ def __init__(self, repo, name):
348348 :param name: the name of the remote, i.e. 'origin'"""
349349self .repo = repo
350350self .name = name
351- self .fetch_no = 0
352351
353352if os .name == 'nt' :
354353# some oddity: on windows, python 2.5, it for some reason does not realize
@@ -524,10 +523,8 @@ def _get_fetch_info_from_stderr(self, proc, progress):
524523
525524progress_handler = progress .new_message_handler ()
526525
527- stderr_fetch = open (join (self .repo .git_dir ,'%03i_debug_git-python_stderr' % self .fetch_no ),'wb' )
528526for line in proc .stderr :
529527line = line .decode (defenc )
530- stderr_fetch .write ((line ).encode (defenc ))
531528line = line .rstrip ()
532529for pline in progress_handler (line ):
533530if line .startswith ('fatal:' ):
@@ -544,13 +541,8 @@ def _get_fetch_info_from_stderr(self, proc, progress):
544541
545542# We are only interested in stderr here ...
546543finalize_process (proc )
547- stderr_fetch .close ()
548544
549545# read head information
550- import shutil
551- shutil .copyfile (join (self .repo .git_dir ,'FETCH_HEAD' ),
552- join (self .repo .git_dir ,'%03i_debug_git-python_FETCH_HEAD' % self .fetch_no ))
553- self .fetch_no += 1
554546fp = open (join (self .repo .git_dir ,'FETCH_HEAD' ),'rb' )
555547fetch_head_info = [l .decode (defenc )for l in fp .readlines ()]
556548fp .close ()