]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/upgrade.py
Refresh the index before performing checks.
[wizard.git] / wizard / command / upgrade.py
index bea128392039ddf8cf1e8bc1e3b11011c92a2b13..3dc13779f7359eff2b4a84b3e64dbfe220b39333 100644 (file)
@@ -136,6 +136,9 @@ class Upgrade(object):
         """Restore :attr:`prod` attribute, and check if the production copy has drifted."""
         self.prod = deploy.ProductionCopy(".")
         try:
+            # simulate the action of `git status`, based on cmd_status()'s call to
+            # refresh_cache() in builtin-commit.c
+            shell.call("git", "update-index", "-q", "--unmerged", "--refresh")
             r1 = shell.eval("git", "diff-files", "--name-only").strip()
             r2 = shell.eval("git", "diff-index", "--name-only", "HEAD").strip()
             if r1 or r2: