docs: def check_staged(filename=None):
      """Check if there are 'changes to be committed' in the index."""
      retcode, _, stdout = git['diff-index', '--quiet', '--cached', 'HEAD',
                               filename].run(retcode=None)
      if retcode == 1:
          return True
      elif retcode == 0:
          return False
      else:
          raise RuntimeError(stdout)