diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2006-12-21 15:26:35 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-21 22:47:49 -0800 |
commit | 95f2fb7d9f84779bf036bb748e245c91bc572840 (patch) | |
tree | 12c63348f979f674c2cf39ffc2da2939353d65d9 /git-reset.sh | |
parent | f79c73ce9ce5d8bd1b4abaf3fc384aa8daa169ef (diff) | |
download | git-95f2fb7d9f84779bf036bb748e245c91bc572840.tar.gz git-95f2fb7d9f84779bf036bb748e245c91bc572840.tar.xz |
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>
Diffstat (limited to 'git-reset.sh')
-rwxr-xr-x | git-reset.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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 ) |