code: def _get_local_rev_and_branch(target, user, password, output_encoding=None):
      '''
      Return the local revision for before/after comparisons
      '''
      log.info('Checking local revision for %s', target)
      try:
          local_rev = __salt__['git.revision'](
              target,
              user=user,
              password=password,
              ignore_retcode=True,
              output_encoding=output_encoding)
      except CommandExecutionError:
          log.info('No local revision for %s', target)
          local_rev = None
  
      log.info('Checking local branch for %s', target)
      try:
          local_branch = __salt__['git.current_branch'](
              target,
              user=user,
              password=password,
              ignore_retcode=True,
              output_encoding=output_encoding)
      except CommandExecutionError:
          log.info('No local branch for %s', target)
          local_branch = None
  
      return local_rev, local_brancf _get_local_rev_and_branch(target, user, password, output_encoding=None):
      '''
      Return the local revision for before/after comparisons
      '''
      log.info('Checking local revision for %s', target)
      try:
          local_rev = __salt__['git.revision'](
              target,
              user=user,
              password=password,
              ignore_retcode=True,
              output_encoding=output_encoding)
      except CommandExecutionError:
          log.info('No local revision for %s', target)
          local_rev = None
  
      log.info('Checking local branch for %s', target)
      try:
          local_branch = __salt__['git.current_branch'](
              target,
              user=user,
              password=password,
              ignore_retcode=True,
              output_encoding=output_encoding)
      except CommandExecutionError:
          log.info('No local branch for %s', target)
          local_branch = None
  
      return local_rev, local_branch
docs: Return the local revision for before/after comparisons