original_docstring: 
          Clean stale local refs so they don't appear as fileserver environments
          
docstring: Clean stale local refs so they don't appear as fileserver environments
docstring_tokens: Clean stale local refs so they don ' t appear as fileserver environments
code: def clean_stale_refs(self):
          '''
          Clean stale local refs so they don't appear as fileserver environments
          '''
          cleaned = []
          for ref in self.repo.remotes[0].stale_refs:
              if ref.name.startswith('refs/tags/'):
                  # Work around GitPython bug affecting removal of tags
                  # https://github.com/gitpython-developers/GitPython/issues/260
                  self.repo.git.tag('-d', ref.name[10:])
              else:
                  ref.delete(self.repo, ref)
              cleaned.append(ref)
          if cleaned:
              log.debug('{0} cleaned the following stale refs: {1}'
                        .format(self.role, cleaned))
          return cleaned
code_tokens: def clean_stale_refs ( self ) : cleaned = [ ] for ref in self . repo . remotes [ 0 ] . stale_refs : if ref . name . startswith ( 'refs/tags/' ) : self . repo . git . tag ( '-d' , ref . name [ 10 : ] ) else : ref . delete ( self . repo , ref ) cleaned . append ( ref ) if cleaned : log . debug ( '{0} cleaned the following stale refs: {1}' . format ( self . role , cleaned ) ) return cleaned
short_docstring: Clean stale local refs so they don't appear as fileserver environments
short_docstring_tokens: Clean stale local refs so they don ' t appear as fileserver environments
comment: '''
          Clean stale local refs so they don't appear as fileserver environments
          '''$SEP$# Work around GitPython bug affecting removal of tags$SEP$# https://github.com/gitpython-developers/GitPython/issues/260