From: "Santi Béjar" <sbejar@gmail•com>
To: Git Mailing List <git@vger•kernel.org>
Subject: [PATCH] git-reset: print always the status when HEAD changes
Date: Thu, 25 Jan 2007 09:48:03 +0100 [thread overview]
Message-ID: <87lkjrv6f0.fsf@gmail.com> (raw)
Signed-off-by: Santi Béjar <sbejar@gmail•com>
---
git-reset.sh | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/git-reset.sh b/git-reset.sh
index fee6d98..a2405c6 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -84,14 +84,16 @@ fi
git-update-ref -m "$GIT_REFLOG_ACTION" HEAD "$rev"
update_ref_status=$?
+if test $update_ref_status = 0 && test "$orig" != "$rev"
+then
+ printf "HEAD is now at "
+ GIT_PAGER= git log --max-count=1 --pretty=oneline \
+ --abbrev-commit HEAD
+fi
+
case "$reset_type" in
--hard )
- test $update_ref_status = 0 && {
- printf "HEAD is now at "
- GIT_PAGER= git log --max-count=1 --pretty=oneline \
- --abbrev-commit HEAD
- }
- ;;
+ ;; # Nothing else to do
--soft )
;; # Nothing else to do
--mixed )
--
1.5.0.rc1.ga98e3
reply other threads:[~2007-01-25 8:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lkjrv6f0.fsf@gmail.com \
--to=sbejar@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox