From: Johannes Schindelin Date: Thu, 21 Dec 2006 14:26:35 +0000 (+0100) Subject: git-reset --hard: tell the user what the HEAD was reset to X-Git-Tag: v1.5.0-rc0~44 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95f2fb7d9f84779bf036bb748e245c91bc572840;p=git.git git-reset --hard: tell the user what the HEAD was reset to Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- 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 )