{"thread":{"id":"6062","subject":"[PATCH] git-reset --hard: tell the user what the HEAD was reset to","startedAt":"2006-12-20T22:55:47Z","lastAt":"2007-01-04T15:59:44Z","messageCount":5,"participants":["Johannes Schindelin","Andy Whitcroft","Han-Wen Nienhuys"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"296791","messageId":"emcf17$esj$1@sea.gmane.org","threadId":"6062","inReplyTo":null,"subject":"UI nitpick","fromName":"Han-Wen Nienhuys","fromEmail":"hanwen@xs4all.nl","sentAt":"2006-12-20T22:55:47Z","receivedAt":"2006-12-20T22:55:47Z","isPatch":false,"sender":{"key":"hanwen@google.com","avatar":"https://avatars.githubusercontent.com/u/31547?v=4"},"body":"\nHi,\n\ngit-reset is really neat when you messed something up, but it \nspews messages.\n\n  [lilydev@haring lilypond]$ git-reset  HEAD\n  lily/accidental-engraver.cc: needs update\n  lily/lyric-combine-music-iterator.cc: needs update\n\nthis makes me think that the reset was unsuccesful.\n\nAfter a few more experiments with \n\n  git-reset <stuff> HEAD^ \n\nI started noticing that the list grew longer and longer.\n\n\nIt would be nice if git-reset printed \n\n HEAD is now <sha1> - <excerpt of commit message>\n\n\n-- \n Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen\n"},{"id":"29954","messageId":"Pine.LNX.4.63.0612211525070.19693@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6062","inReplyTo":"emcf17$esj$1@sea.gmane.org","subject":"[PATCH] git-reset --hard: tell the user what the HEAD was reset to","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-12-21T14:26:35Z","receivedAt":"2006-12-21T14:26:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nSigned-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n---\n\n\tOn Wed, 20 Dec 2006, Han-Wen Nienhuys wrote:\n\n\t> It would be nice if git-reset printed \n\t> \n\t>  HEAD is now <sha1> - <excerpt of commit message>\n\n\tThis patch does that, but only for --reset.\n\n\tWithout reset, HEAD is _not_ changed, just the contents of the\n\tworking directory and/or the index.\n\n git-reset.sh |    7 ++++++-\n 1 files changed, 6 insertions(+), 1 deletions(-)\n\ndiff --git a/git-reset.sh b/git-reset.sh\nindex 8d95e37..2379db0 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -86,7 +86,12 @@ update_ref_status=$?\n \n case \"$reset_type\" in\n --hard )\n-\t;; # Nothing else to do\n+\ttest $update_ref_status = 0 && {\n+\t\techo -n \"HEAD is now at \"\n+\t\tGIT_PAGER= git log --max-count=1 --pretty=oneline \\\n+\t\t\t--abbrev-commit HEAD\n+\t}\n+\t;;\n --soft )\n \t;; # Nothing else to do\n --mixed )\n-- \n1.4.4.3.gdb8fb-dirty\n"},{"id":"30747","messageId":"459BACE1.5020406@shadowen.org","threadId":"6062","inReplyTo":"Pine.LNX.4.63.0612211525070.19693@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] git-reset --hard: tell the user what the HEAD was reset to","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2007-01-03T13:17:21Z","receivedAt":"2007-01-03T13:17:21Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n> ---\n> \n> \tOn Wed, 20 Dec 2006, Han-Wen Nienhuys wrote:\n> \n> \t> It would be nice if git-reset printed \n> \t> \n> \t>  HEAD is now <sha1> - <excerpt of commit message>\n> \n> \tThis patch does that, but only for --reset.\n> \n> \tWithout reset, HEAD is _not_ changed, just the contents of the\n> \tworking directory and/or the index.\n> \n>  git-reset.sh |    7 ++++++-\n>  1 files changed, 6 insertions(+), 1 deletions(-)\n> \n> diff --git a/git-reset.sh b/git-reset.sh\n> index 8d95e37..2379db0 100755\n> --- a/git-reset.sh\n> +++ b/git-reset.sh\n> @@ -86,7 +86,12 @@ update_ref_status=$?\n>  \n>  case \"$reset_type\" in\n>  --hard )\n> -\t;; # Nothing else to do\n> +\ttest $update_ref_status = 0 && {\n> +\t\techo -n \"HEAD is now at \"\n> +\t\tGIT_PAGER= git log --max-count=1 --pretty=oneline \\\n> +\t\t\t--abbrev-commit HEAD\n> +\t}\n> +\t;;\n>  --soft )\n>  \t;; # Nothing else to do\n>  --mixed )\n\nOk, this sounds like a good change in principle, but the output format\nit introduces seems likely to cause confusion.  For sure the first\ncouple of times I saw it I though there was a bug and I was seeing an\nerror from the plumbing.  See below for an example where you would swear\nsomething bad had occured.\n\n  apw@pinky$ git checkout -b bar master\n  apw@pinky$ git reset --hard ac9c1108d8915f0937795e354ad72c4ae6890a3f\n  HEAD is now at ac9c110... git-fetch: remove .keep file at the end.\n\nHuh, fetch?  Remove what .keep file?  Did I do a fetch?  What?\n\nI think we need to delimit the name better, probabally we need to quote\nit.  Perhaps something like:\n\n  HEAD is now at ac9c110: \"git-fetch: remove .keep file at the end\".\n\n-apw\n"},{"id":"30812","messageId":"Pine.LNX.4.63.0701041357380.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6062","inReplyTo":"459BACE1.5020406@shadowen.org","subject":"Re: [PATCH] git-reset --hard: tell the user what the HEAD was reset to","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-04T12:59:54Z","receivedAt":"2007-01-04T12:59:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 3 Jan 2007, Andy Whitcroft wrote:\n\n> I think we need to delimit the name better, probabally we need to quote\n> it.  Perhaps something like:\n> \n>   HEAD is now at ac9c110: \"git-fetch: remove .keep file at the end\".\n\nFine. But this is \"git log --pretty=oneline --abbrev-commit\". I don't know \nhow many things break if you change _that_.\n\nAlternatively, you could pipe that into a sed command adding the colon and \nthe quotes.\n\nCiao,\nDscho\n"},{"id":"30819","messageId":"459D2470.2090001@shadowen.org","threadId":"6062","inReplyTo":"Pine.LNX.4.63.0701041357380.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] git-reset --hard: tell the user what the HEAD was reset to","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2007-01-04T15:59:44Z","receivedAt":"2007-01-04T15:59:44Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Wed, 3 Jan 2007, Andy Whitcroft wrote:\n> \n>> I think we need to delimit the name better, probabally we need to quote\n>> it.  Perhaps something like:\n>>\n>>   HEAD is now at ac9c110: \"git-fetch: remove .keep file at the end\".\n> \n> Fine. But this is \"git log --pretty=oneline --abbrev-commit\". I don't know \n> how many things break if you change _that_.\n> \n> Alternatively, you could pipe that into a sed command adding the colon and \n> the quotes.\n\nQuack, so it is.\n\napw@pinky$ git log --pretty=oneline --abbrev-commit | head -1\nf4bf218... Update clone/fetch documentation with --depth (shallow clone)\noption\n\nPerhaps we could do something like:\n\nHead is now at \"f4bf218... Update clone/fetch documentation with --depth\n(shallow clone) option\"\n\nHmmm ... oh well I guess I'll just get used to it.\n\n-apw\n"}]}