* [PATCH] git-reset: print always the status when HEAD changes
@ 2007-01-25 8:48 Santi Béjar
0 siblings, 0 replies; only message in thread
From: Santi Béjar @ 2007-01-25 8:48 UTC (permalink / raw)
To: Git Mailing List
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-25 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-25 8:48 [PATCH] git-reset: print always the status when HEAD changes Santi Béjar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).