git-reset --hard: tell the user what the HEAD was reset to
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Johannes Schindelin committed
Dec 21, 2006 at 15:26 UTC
95f2fb7d9f84779bf036bb748e245c91bc572840
1 file changed
+6
-1
git-reset.sh
+6
-1
@@ -86,7 +86,12 @@ update_ref_status=$?
86
87
case "$reset_type" in
88
--hard )
89
- ;; # Nothing else to do
89
+ test $update_ref_status = 0 && {
90
+ echo -n "HEAD is now at "
91
+ GIT_PAGER= git log --max-count=1 --pretty=oneline \
92
+ --abbrev-commit HEAD
93
+ }
94
+ ;;
95
--soft )
96
;; # Nothing else to do
97
--mixed )