]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/git.py
Convert ad hoc shell calls to singleton instance; fix upgrade bug.
[wizard.git] / wizard / git.py
index 858ed6b636ee14725ce1830504e6d8b35ca09cc3..634076612964c2088a4db77d18a1aa85b7911606 100644 (file)
@@ -2,9 +2,17 @@
 Helper functions for dealing with Git.
 """
 
-from wizard import shell
+from wizard import shell, util
 
 def describe():
     """Finds the output of git describe --tags of the current directory."""
-    return shell.Shell().safeCall("git", "describe", "--tags", strip=True)
+    return shell.safeCall("git", "describe", "--tags", strip=True)
 
+def commit_configure():
+    message = "Autoinstall configuration of %s locker.\n\n%s" % (util.get_dir_owner(), util.get_git_footer())
+    util.set_git_env()
+    try:
+        message += "\nConfigured-by: " + util.get_operator_git()
+    except util.NoOperatorInfo:
+        pass
+    shell.call("git", "commit", "--allow-empty", "-a", "-m", message)