git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to
@ 2007-01-06 10:23 Fredrik Kuivinen
  2007-01-06 19:26 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Fredrik Kuivinen @ 2007-01-06 10:23 UTC (permalink / raw)
  To: junkio; +Cc: git


Idea and motivating example from Andy Whitcroft:

    apw@pinky$ git checkout -b bar master
    apw@pinky$ git reset --hard ac9c1108d8915f0937795e354ad72c4ae6890a3f
    HEAD is now at ac9c110... git-fetch: remove .keep file at the end.

    Huh, fetch?  Remove what .keep file?  Did I do a fetch?  What?
    
    I think we need to delimit the name better, probabally we need to quote
    it.  Perhaps something like:

    HEAD is now at ac9c110: "git-fetch: remove .keep file at the end".

Signed-off-by: Fredrik Kuivinen <frekui@gmail.com>

---

 git-reset.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/git-reset.sh b/git-reset.sh
index a969370..9b49883 100755
--- a/git-reset.sh
+++ b/git-reset.sh
@@ -90,7 +90,8 @@ case "$reset_type" in
 	test $update_ref_status = 0 && {
 		echo -n "HEAD is now at "
 		GIT_PAGER= git log --max-count=1 --pretty=oneline \
-			--abbrev-commit HEAD
+			--abbrev-commit HEAD |
+		    sed 's/\([0-9a-f.]*\) \(.*\)/\1: "\2"/'
 	}
 	;;
 --soft )

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-01-08  8:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-06 10:23 [PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to Fredrik Kuivinen
2007-01-06 19:26 ` Junio C Hamano
2007-01-07 12:56   ` Fredrik Kuivinen
2007-01-07 21:10     ` Junio C Hamano
2007-01-08  8:33       ` Andy Whitcroft

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).