From dad39cfbf290359ea3093b5d70c0ea9099cc91d4 Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Tue, 15 Jul 2008 09:33:15 -0400 Subject: [PATCH] cmd_point: unwind tags more cleanly --- yap/yap.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/yap/yap.py b/yap/yap.py index 0c71f0b..401377c 100644 --- a/yap/yap.py +++ b/yap/yap.py @@ -736,18 +736,13 @@ operation in spite of this. if not head: raise YapError("No commit yet; nowhere to point") - ref = get_output("git rev-parse --verify '%s'" % where) + ref = get_output("git rev-parse --verify '%s^{commit}'" % where) if not ref: raise YapError("Not a valid ref: %s" % where) if self._get_unstaged_files() or self._get_staged_files(): raise YapError("You have uncommitted changes. Commit them first") - type = get_output("git cat-file -t '%s'" % ref[0]) - if type and type[0] == "tag": - tag = get_output("git cat-file tag '%s'" % ref[0]) - ref[0] = tag[0].split(' ')[1] - run_safely("git update-ref HEAD '%s'" % ref[0]) if '-f' not in flags: -- 2.11.4.GIT