Skip to content

Commit

Permalink
git-reset --hard: tell the user what the HEAD was reset to
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Dec 22, 2006
1 parent f79c73c commit 95f2fb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion git-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 95f2fb7

Please sign in to comment.