   "In LOCAL-REPO, check out COMMIT.
 LOCAL-REPO is a string naming a local package repository. COMMIT
 is a 40-character string identifying a Git commit."
+  (straight-register-repo-modification local-repo)
   (while t
     (and (straight-vc-git--ensure-nothing-in-progress local-repo)
          (straight-vc-git--ensure-worktree local-repo)

      (local-repo branch)
    (let ((branch (or branch straight-vc-git-default-branch)))
      (and (straight-vc-git--ensure-remotes recipe)
           (straight-vc-git--ensure-nothing-in-progress local-repo)
           (straight-vc-git--ensure-worktree local-repo)
           (straight-vc-git--ensure-head local-repo branch)))))

;;;;;; API


This means that its remote URLs are set correctly; there is no
merge currently in progress; its worktree is pristine; and the
primary :branch is checked out."
  (straight--with-plist recipe
      (local-repo)
    (while t
      (and (or (straight-vc-git--ensure-local recipe)
               (straight-register-repo-modification local-repo))
           (cl-return-from straight-vc-git-normalize t)))))

(cl-defun straight-vc-git-fetch-from-remote (recipe &optional from-upstream)
  "Using straight.el-style RECIPE, fetch from the primary remote.
