Hi,
git-reset is really neat when you messed something up, but it
spews messages.
[lilydev@haring lilypond]$ git-reset HEAD
lily/accidental-engraver.cc: needs update
lily/lyric-combine-music-iterator.cc: needs update
this makes me think that the reset was unsuccesful.
After a few more experiments with
git-reset <stuff> HEAD^
I started noticing that the list grew longer and longer.
It would be nice if git-reset printed
HEAD is now <sha1> - <excerpt of commit message>
--
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:42:46
Signed-off-by: Johannes Schindelin <redacted>
---
On Wed, 20 Dec 2006, Han-Wen Nienhuys wrote:
> It would be nice if git-reset printed
>
> HEAD is now <sha1> - <excerpt of commit message>
This patch does that, but only for --reset.
Without reset, HEAD is _not_ changed, just the contents of the
working directory and/or the index.
git-reset.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
@@ -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=gitlog--max-count=1--pretty=oneline\+--abbrev-commitHEAD+}+;; --soft);;# Nothing else to do --mixed)
From: Andy Whitcroft <hidden> Date: 2016-06-15 22:42:47
Johannes Schindelin wrote:
quoted hunk
Signed-off-by: Johannes Schindelin <redacted>
---
On Wed, 20 Dec 2006, Han-Wen Nienhuys wrote:
> It would be nice if git-reset printed
>
> HEAD is now <sha1> - <excerpt of commit message>
This patch does that, but only for --reset.
Without reset, HEAD is _not_ changed, just the contents of the
working directory and/or the index.
git-reset.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
@@ -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=gitlog--max-count=1--pretty=oneline\+--abbrev-commitHEAD+}+;; --soft);;# Nothing else to do --mixed)
Ok, this sounds like a good change in principle, but the output format
it introduces seems likely to cause confusion. For sure the first
couple of times I saw it I though there was a bug and I was seeing an
error from the plumbing. See below for an example where you would swear
something bad had occured.
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".
-apw
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:42:47
Hi,
On Wed, 3 Jan 2007, Andy Whitcroft wrote:
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".
Fine. But this is "git log --pretty=oneline --abbrev-commit". I don't know
how many things break if you change _that_.
Alternatively, you could pipe that into a sed command adding the colon and
the quotes.
Ciao,
Dscho
From: Andy Whitcroft <hidden> Date: 2016-06-15 22:42:47
Johannes Schindelin wrote:
Hi,
On Wed, 3 Jan 2007, Andy Whitcroft wrote:
quoted
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".
Fine. But this is "git log --pretty=oneline --abbrev-commit". I don't know
how many things break if you change _that_.
Alternatively, you could pipe that into a sed command adding the colon and
the quotes.
Quack, so it is.
apw@pinky$ git log --pretty=oneline --abbrev-commit | head -1
f4bf218... Update clone/fetch documentation with --depth (shallow clone)
option
Perhaps we could do something like:
Head is now at "f4bf218... Update clone/fetch documentation with --depth
(shallow clone) option"
Hmmm ... oh well I guess I'll just get used to it.
-apw