From fb4497244e7e21d8e35b5c5323433dc34a7d4287 Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Fri, 11 Jul 2008 09:18:32 -0400 Subject: [PATCH] cmd_point: fallback to non-merging read-tree --- yap/yap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yap/yap.py b/yap/yap.py index 7cceab6..3520f63 100644 --- a/yap/yap.py +++ b/yap/yap.py @@ -690,7 +690,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") - run_safely("git read-tree -u -m HEAD") + 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") @short_help("alter history by dropping or amending commits") -- 2.11.4.GIT