{"thread":{"id":"6814","subject":"[PATCH] The \"table-of-contents\" in the update hook script should match the body","startedAt":"2007-02-14T11:20:32Z","lastAt":"2007-02-15T10:15:46Z","messageCount":3,"participants":["Andy Parkins","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"34516","messageId":"200702141120.32776.andyparkins@gmail.com","threadId":"6814","inReplyTo":null,"subject":"[PATCH] The \"table-of-contents\" in the update hook script should match the body","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-14T11:20:32Z","receivedAt":"2007-02-14T11:20:32Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"44478d99ee0 introduced a filter using \"git-rev-parse --not --all\" to the\nlog display to prevent the display of revisions already in the\nrepository.  However, the table of contents generation didn't get that\nsame update.\n\nThis patch fixes that.  The table of contents before the log and the log\nnow both display the same list of revisions.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\nApologies.  I should always wait a day before posting patches.\n\n templates/hooks--update |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/templates/hooks--update b/templates/hooks--update\nindex a7cf604..fd1f73d 100644\n--- a/templates/hooks--update\n+++ b/templates/hooks--update\n@@ -57,7 +57,7 @@ announcerecipients=$(git-repo-config hooks.announcelist)\n allowunannotated=$(git-repo-config --bool hooks.allowunannotated)\n \n # --- Check types\n-newrev_type=$(git-cat-file -t \"$newrev\")\n+newrev_type=$(git-cat-file -t $newrev)\n \n case \"$refname\",\"$newrev_type\" in\n \trefs/tags/*,commit)\n@@ -165,7 +165,7 @@ case \"$refname_type\" in\n \t\t\tbaserev=$(git-merge-base $oldrev $newrev)\n \n \t\t\t# Commit with a parent\n-\t\t\tfor rev in $(git-rev-list $newrev ^$baserev)\n+\t\t\tfor rev in $(git-rev-parse --not --all | git-rev-list --stdin $newrev ^$baserev)\n \t\t\tdo\n \t\t\t\trevtype=$(git-cat-file -t \"$rev\")\n \t\t\t\techo \"       via  $rev ($revtype)\"\n-- \n1.5.0.rc4.365.g5eff6-dirty\n"},{"id":"34562","messageId":"7vy7n0r87y.fsf@assigned-by-dhcp.cox.net","threadId":"6814","inReplyTo":"200702141120.32776.andyparkins@gmail.com","subject":"Re: [PATCH] The \"table-of-contents\" in the update hook script should match the body","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-14T16:53:53Z","receivedAt":"2007-02-14T16:53:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Parkins <andyparkins@gmail.com> writes:\n\n> 44478d99ee0 introduced a filter using \"git-rev-parse --not --all\" to the\n> log display to prevent the display of revisions already in the\n> repository.  However, the table of contents generation didn't get that\n> same update.\n>\n> This patch fixes that.  The table of contents before the log and the log\n> now both display the same list of revisions.\n>\n> Signed-off-by: Andy Parkins <andyparkins@gmail.com>\n> ---\n> Apologies.  I should always wait a day before posting patches.\n\nNo worries.  I will always wait a day before applying yours ;-)\n\nJust kidding.  It's not a big deal as this is purely a sample\nscript.\n\n>  templates/hooks--update |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/templates/hooks--update b/templates/hooks--update\n> index a7cf604..fd1f73d 100644\n> --- a/templates/hooks--update\n> +++ b/templates/hooks--update\n> @@ -57,7 +57,7 @@ announcerecipients=$(git-repo-config hooks.announcelist)\n>  allowunannotated=$(git-repo-config --bool hooks.allowunannotated)\n>  \n>  # --- Check types\n> -newrev_type=$(git-cat-file -t \"$newrev\")\n> +newrev_type=$(git-cat-file -t $newrev)\n>  \n>  case \"$refname\",\"$newrev_type\" in\n>  \trefs/tags/*,commit)\n\nI do not think this hunk is related...\n"},{"id":"34688","messageId":"200702151015.47828.andyparkins@gmail.com","threadId":"6814","inReplyTo":"7vy7n0r87y.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] The \"table-of-contents\" in the update hook script should match the body","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-15T10:15:46Z","receivedAt":"2007-02-15T10:15:46Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Wednesday 2007 February 14 16:53, Junio C Hamano wrote:\n\n> > -newrev_type=$(git-cat-file -t \"$newrev\")\n> > +newrev_type=$(git-cat-file -t $newrev)\n> >\n> >  case \"$refname\",\"$newrev_type\" in\n> >  \trefs/tags/*,commit)\n>\n> I do not think this hunk is related...\n\nOops; yes you're right.  I was having trouble with git-cvsserver calling the \nupdate hook; and that was the fix.  However, it's nothing to do with that \npatch - and I suspect that that fix should more properly be in git-cvsserver.\n\n\nAndy\n\n\n-- \nDr Andy Parkins, M Eng (hons), MIEE\nandyparkins@gmail.com\n"}]}