summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-reset.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/git-reset.sh b/git-reset.sh
index 8d95e37..2379db0 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -86,7 +86,12 @@ update_ref_status=$?
case "$reset_type" in
--hard )
- ;; # Nothing else to do
+ test $update_ref_status = 0 && {
+ echo -n "HEAD is now at "
+ GIT_PAGER= git log --max-count=1 --pretty=oneline \
+ --abbrev-commit HEAD
+ }
+ ;;
--soft )
;; # Nothing else to do
--mixed )