From 730fe3ca7aac7b19c03d83c9bdeeea9dfd61e2b7 Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Tue, 19 Aug 2008 14:10:20 -0400 Subject: [PATCH] cmd_point: show status output from read-tree This change has the nice effect of also simplifying the code --- yap/yap.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/yap/yap.py b/yap/yap.py index ca5883e..1c13191 100644 --- a/yap/yap.py +++ b/yap/yap.py @@ -793,11 +793,10 @@ operation in spite of this. os.system("git update-ref HEAD '%s'" % head[0]) raise YapError("Pointing there will lose commits. Use -f to force") - try: - run_safely("git read-tree -u -m HEAD") - except ShellError: - run_safely("git read-tree HEAD") - run_safely("git checkout-index -u -f -a") + run_command("git update-index --refresh") + rc = os.system("git read-tree -v --reset -u HEAD") + if rc: + raise YapError("checkout-index failed") self._clear_state() @short_help("alter history by dropping or amending commits") -- 2.11.4.GIT