summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-08-06 20:54:43 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2005-08-06 20:54:43 -0700
commit55bc3fe36a4b931c3899dc453bf2d554ccabc495 (patch)
tree268df3c7599ff9198d072789e234b8259c5fff2d
parentGIT 0.99.4 (release candidate) (diff)
parent[PATCH] Extend "git reset" to take a reset point (diff)
downloadtgif-55bc3fe36a4b931c3899dc453bf2d554ccabc495.tar.xz
Merge with master.
This merges commit bfe19f876cb20bea606e1a698030c017f31965c1 from master into our head commit 7a59013290bb26b80c997e5698757a735f1a92e0 Sincerely, jit-merge command.
-rwxr-xr-xgit-reset-script4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-reset-script b/git-reset-script
index 0c02aa6423..b6476edc30 100755
--- a/git-reset-script
+++ b/git-reset-script
@@ -1,5 +1,7 @@
#!/bin/sh
. git-sh-setup-script || die "Not a git archive"
-git-read-tree --reset HEAD
+rev=$(git-rev-parse --revs-only --verify --default HEAD "$@") || exit
+rev=$(git-rev-parse --revs-only --verify $rev^0) || exit
+git-read-tree --reset "$rev" && echo "$rev" > "$GIT_DIR/HEAD"
git-update-cache --refresh
rm -f "$GIT_DIR/MERGE_HEAD"