{"thread":{"id":"6250","subject":"[PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to","startedAt":"2007-01-06T10:23:22Z","lastAt":"2007-01-08T08:33:49Z","messageCount":5,"participants":["Fredrik Kuivinen","Junio C Hamano","Andy Whitcroft"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"30967","messageId":"20070106102322.7468.57615.stgit@c165","threadId":"6250","inReplyTo":null,"subject":"[PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to","fromName":"Fredrik Kuivinen","fromEmail":"freku045@student.liu.se","sentAt":"2007-01-06T10:23:22Z","receivedAt":"2007-01-06T10:23:22Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"\nIdea and motivating example from Andy Whitcroft:\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\n    Huh, fetch?  Remove what .keep file?  Did I do a fetch?  What?\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\nSigned-off-by: Fredrik Kuivinen <frekui@gmail.com>\n\n---\n\n git-reset.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/git-reset.sh b/git-reset.sh\nindex a969370..9b49883 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -90,7 +90,8 @@ case \"$reset_type\" in\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\t\t--abbrev-commit HEAD |\n+\t\t    sed 's/\\([0-9a-f.]*\\) \\(.*\\)/\\1: \"\\2\"/'\n \t}\n \t;;\n --soft )\n"},{"id":"30978","messageId":"7v8xgg553u.fsf@assigned-by-dhcp.cox.net","threadId":"6250","inReplyTo":"20070106102322.7468.57615.stgit@c165","subject":"Re: [PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-06T19:26:29Z","receivedAt":"2007-01-06T19:26:29Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Fredrik Kuivinen <freku045@student.liu.se> writes:\n\n> Idea and motivating example from Andy Whitcroft:\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>\n>     Huh, fetch?  Remove what .keep file?  Did I do a fetch?  What?\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\nI've also considered something along that line, but:\n\n (1) I think this 'confusion' is only because you are futzing\n     with a project that deals with git-fetch and friends and\n     not a general problem.\n\n (2) With \"HEAD is now at xxxxx...\"  prefix, even two characters\n     are precious to fit the title of the commit on a single\n     line.\n\nWith these in mind, do you still want to do this?\n"},{"id":"31050","messageId":"4c8ef70701070456k2f0585f4ga6c35bd77c939c59@mail.gmail.com","threadId":"6250","inReplyTo":"7v8xgg553u.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to","fromName":"Fredrik Kuivinen","fromEmail":"frekui@gmail.com","sentAt":"2007-01-07T12:56:59Z","receivedAt":"2007-01-07T12:56:59Z","isPatch":true,"sender":{"key":"frekui@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13770967?v=4"},"body":"On 1/6/07, Junio C Hamano <junkio@cox.net> wrote:\n> Fredrik Kuivinen <freku045@student.liu.se> writes:\n>\n> > Idea and motivating example from Andy Whitcroft:\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> >\n> >     Huh, fetch?  Remove what .keep file?  Did I do a fetch?  What?\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> I've also considered something along that line, but:\n>\n>  (1) I think this 'confusion' is only because you are futzing\n>      with a project that deals with git-fetch and friends and\n>      not a general problem.\n>\n>  (2) With \"HEAD is now at xxxxx...\"  prefix, even two characters\n>      are precious to fit the title of the commit on a single\n>      line.\n>\n> With these in mind, do you still want to do this?\n\nI don't think the second point is much of an issue. Is it really that\nirritating to\nread a word-wrapped line of text? I agree with the first point though, in most\ncases it will not be a problem in other projects.\n\nI still think it is worth doing it, but it certainly isn't super\nimportant. Feel free\nto drop the patch if you want to.\n\n- Fredrik\n"},{"id":"31080","messageId":"7vfyam1r18.fsf@assigned-by-dhcp.cox.net","threadId":"6250","inReplyTo":"4c8ef70701070456k2f0585f4ga6c35bd77c939c59@mail.gmail.com","subject":"Re: [PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-07T21:10:59Z","receivedAt":"2007-01-07T21:10:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Fredrik Kuivinen\" <frekui@gmail.com> writes:\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> I don't think the second point is much of an issue. Is it really that\n> irritating to\n> read a word-wrapped line of text? I agree with the first point though, in most\n> cases it will not be a problem in other projects.\n>\n> I still think it is worth doing it, but it certainly isn't super\n> important. Feel free\n> to drop the patch if you want to.\n\nI do not care much either way, but the third point is that the\nquoted output would look \"interesting\" if the original title\ntext has double-quoted words.  I.e.\n\n    HEAD is now at 9945d98: \"Add \"--cacheinfo\" option to update-cache.\"\n\nNotice also your hand-wrapped example has the final full-stop\noutside the quote, which your patch would not produce ;-).\n"},{"id":"31124","messageId":"45A201ED.8030003@shadowen.org","threadId":"6250","inReplyTo":"7vfyam1r18.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] git-reset --hard: use quotes when we tell the user what HEAD was reset to","fromName":"Andy Whitcroft","fromEmail":"apw@shadowen.org","sentAt":"2007-01-08T08:33:49Z","receivedAt":"2007-01-08T08:33:49Z","isPatch":true,"sender":{"key":"apw@shadowen.org","avatar":"https://gravatar.com/avatar/d3088262854661a913ef35cc40fedcc270142d4461791142bc1ea0b2a4e2e147?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> \"Fredrik Kuivinen\" <frekui@gmail.com> writes:\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>> I don't think the second point is much of an issue. Is it really that\n>> irritating to\n>> read a word-wrapped line of text? I agree with the first point though, in most\n>> cases it will not be a problem in other projects.\n>>\n>> I still think it is worth doing it, but it certainly isn't super\n>> important. Feel free\n>> to drop the patch if you want to.\n> \n> I do not care much either way, but the third point is that the\n> quoted output would look \"interesting\" if the original title\n> text has double-quoted words.  I.e.\n> \n>     HEAD is now at 9945d98: \"Add \"--cacheinfo\" option to update-cache.\"\n> \n> Notice also your hand-wrapped example has the final full-stop\n> outside the quote, which your patch would not produce ;-).\n\nHeh, well perhaps I should use the original for a while longer and see\nif I get used to it.  Of course I mostly use git on git and linux which\nboth tend to have \"error\" in their titles :).\n\n-apw\n"}]}