code: def get_signature(self, base_commit=None):
          
          if base_commit is None:
              base_commit = 'HEAD'
          self.run('add', '-A', self.path)
          sha = self.run('rev-parse', '--verify', base_commit).strip()
          diff = self.run('diff', sha).strip()
          if len(diff) == 0:
              try:
                  return self.get_signature(base_commit + '~1')
              except CommandError:
                  pass
          h = hashlib.sha1()
          h.update(sha)
          h.update(diff)
          return h.hexdigest()
docs: Get the signature of the current state of the repository
  
          TODO right now `get_signature` is an effectful process in that
          it adds all untracked file to staging. This is the only way to get
          accruate diff on new files. This is ok because we only use it on a
          disposable copy of the repo.
  
          Args:
              base_commit - the base commit ('HEAD', sha, etc.)
  
          Returns:
              str