]> scripts.mit.edu Git - wizard.git/commitdiff
Refresh the index before performing checks.
authorEdward Z. Yang <ezyang@mit.edu>
Tue, 6 Jul 2010 05:59:53 +0000 (01:59 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Tue, 6 Jul 2010 05:59:53 +0000 (01:59 -0400)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
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: