{"thread":{"id":"6411","subject":"[PATCH] git-reset: make the output as the fetch output","startedAt":"2007-01-17T12:56:15Z","lastAt":"2007-01-17T15:35:53Z","messageCount":6,"participants":["Santi Béjar","Andy Parkins","Johannes Schindelin","YOSHIFUJI Hideaki / 吉藤英明"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"31880","messageId":"87odox23u9.fsf@gmail.com","threadId":"6411","inReplyTo":null,"subject":"[PATCH] git-reset: make the output as the fetch output","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2007-01-17T12:56:15Z","receivedAt":"2007-01-17T12:56:15Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"\n... and only when HEAD is changed.\n\nSigned-off-by: Santi Béjar <sbejar@gmail.com>\n---\n git-reset.sh |   19 +++++++++++++------\n 1 files changed, 13 insertions(+), 6 deletions(-)\n\ndiff --git a/git-reset.sh b/git-reset.sh\nindex bf2a058..acefddc 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -24,6 +24,7 @@ do\n \t\tusage\n \t\t;;\n \t*)\n+\t\tcommit=\"$1\"\n \t\trev=$(git-rev-parse --verify \"$1\") || exit\n \t\tshift\n \t\tbreak\n@@ -84,14 +85,20 @@ fi\n git-update-ref -m \"$GIT_REFLOG_ACTION\" HEAD \"$rev\"\n update_ref_status=$?\n \n+if test $update_ref_status = 0 && test \"$orig\" != \"$rev\"\n+then\n+    revshort=$(git-rev-parse --short $rev)\n+    echo \"* HEAD: reset to $commit\"\n+    if test \"$orig\" ; then\n+\techo \"  old..new: $(git-rev-parse --short $orig)..$revshort\"\n+    else\n+\techo \"  commit: $revshort\"\n+    fi\n+fi\n+\n case \"$reset_type\" in\n --hard )\n-\ttest $update_ref_status = 0 && {\n-\t\tprintf \"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+\t;; # Nothing else to do\n --soft )\n \t;; # Nothing else to do\n --mixed )\n-- \n1.5.0.rc1.g0dee5\n"},{"id":"31881","messageId":"8aa486160701170527p69c59510i2daf99e7e805ec5a@mail.gmail.com","threadId":"6411","inReplyTo":"87odox23u9.fsf@gmail.com","subject":"Re: [PATCH] git-reset: make the output as the fetch output","fromName":"Santi Béjar","fromEmail":"sbejar@gmail.com","sentAt":"2007-01-17T13:27:15Z","receivedAt":"2007-01-17T13:27:15Z","isPatch":true,"sender":{"key":"santi@agolina.net","avatar":null},"body":"Hi *,\n\n> @@ -84,14 +85,20 @@ fi\n[...]\n> +    echo \"* HEAD: reset to $commit\"\n[...]\n\nperhaps?\necho \"* HEAD: resetted to $commit\"\n\nSanti\n"},{"id":"31886","messageId":"20070117.223854.10678094.yoshfuji@linux-ipv6.org","threadId":"6411","inReplyTo":"8aa486160701170527p69c59510i2daf99e7e805ec5a@mail.gmail.com","subject":"Re: [PATCH] git-reset: make the output as the fetch output","fromName":"YOSHIFUJI Hideaki / 吉藤英明","fromEmail":"yoshfuji@linux-ipv6.org","sentAt":"2007-01-17T13:38:54Z","receivedAt":"2007-01-17T13:38:54Z","isPatch":true,"sender":{"key":"yoshfuji@linux-ipv6.org","avatar":"https://gravatar.com/avatar/92c288bb8d3e34afd7bb1574cc1079a3d0aa6d36d80955d1ec6a1cea2868d392?d=mp&s=160"},"body":"In article <8aa486160701170527p69c59510i2daf99e7e805ec5a@mail.gmail.com> (at Wed, 17 Jan 2007 14:27:15 +0100), \"Santi Béjar\" <sbejar@gmail.com> says:\n\n> > @@ -84,14 +85,20 @@ fi\n> [...]\n> > +    echo \"* HEAD: reset to $commit\"\n> [...]\n> \n> perhaps?\n> echo \"* HEAD: resetted to $commit\"\n\nOf course, not.  Past (and past participle) of \"reset\" is \"reset\".\n\n--yoshfuji\n"},{"id":"31882","messageId":"200701171341.22860.andyparkins@gmail.com","threadId":"6411","inReplyTo":"8aa486160701170527p69c59510i2daf99e7e805ec5a@mail.gmail.com","subject":"Re: [PATCH] git-reset: make the output as the fetch output","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-01-17T13:41:21Z","receivedAt":"2007-01-17T13:41:21Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Wednesday 2007 January 17 13:27, Santi Béjar wrote:\n\n> > +    echo \"* HEAD: reset to $commit\"\n>\n> [...]\n>\n> perhaps?\n> echo \"* HEAD: resetted to $commit\"\n\nYou were right the first time; \"reset\" is the correct past-tense form.  If \nanything, I'd lose the colon...\n\n HEAD reset to $commit\n\nis a perfectly acceptable sentence.\n\n\n\nAndy\n-- \nDr Andy Parkins, M Eng (hons), MIEE\nandyparkins@gmail.com\n"},{"id":"31883","messageId":"Pine.LNX.4.63.0701171441250.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6411","inReplyTo":"87odox23u9.fsf@gmail.com","subject":"Re: [PATCH] git-reset: make the output as the fetch output","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-17T13:43:04Z","receivedAt":"2007-01-17T13:43:04Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nIMHO your version is less helpful than the current behaviour: now it \nshows the oneline (which your version doesn't), and in most cases you \nreset from a dirty state (at least I _exclusively_ use reset in such \nsituations), where \"from..to\" does not make any sense.\n\nCiao,\nDscho\n"},{"id":"31892","messageId":"Pine.LNX.4.63.0701171634160.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"6411","inReplyTo":"8aa486160701170723j5767f0d3jd3eb4b8817413195@mail.gmail.com","subject":"Re: [PATCH] git-reset: make the output as the fetch output","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-01-17T15:35:53Z","receivedAt":"2007-01-17T15:35:53Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\n[reCc'ing list]\n\nOn Wed, 17 Jan 2007, Santi Béjar wrote:\n\n> On 1/17/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:\n> > Hi,\n> > \n> > IMHO your version is less helpful than the current behaviour: now it\n> > shows the oneline (which your version doesn't), and in most cases you\n> > reset from a dirty state (at least I _exclusively_ use reset in such\n> > situations), where \"from..to\" does not make any sense.\n> \n> My motivation is to have a coherent output. I recognize that the ..\n> notation in fetch (fastforwarding) does not generally make sense in\n> reset. Could be better\n> \n> * HEAD: reset to ...\n>  old: $hash\n>  new: $hash\n> \n> If I want to see the commit title I do a \"git branch -v\".\n\nThe whole point of tags/v1.5.0-rc0~44 was to _avoid_ \"git branch -v\", or \n\"git show HEAD\".\n\nCiao,\nDscho\n"}]}