From 95f2fb7d9f84779bf036bb748e245c91bc572840 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 21 Dec 2006 15:26:35 +0100 Subject: [PATCH] git-reset --hard: tell the user what the HEAD was reset to Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- git-reset.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git-reset.sh b/git-reset.sh index 8d95e3748..2379db082 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 ) -- 2.30.2