{"thread":{"id":"6798","subject":"[PATCH 1/3] Fix potential command line overflow in hooks--update","startedAt":"2007-02-13T14:23:58Z","lastAt":"2007-02-13T18:03:42Z","messageCount":2,"participants":["Andy Parkins","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"34405","messageId":"200702131423.58561.andyparkins@gmail.com","threadId":"6798","inReplyTo":null,"subject":"[PATCH 1/3] Fix potential command line overflow in hooks--update","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2007-02-13T14:23:58Z","receivedAt":"2007-02-13T14:23:58Z","isPatch":true,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"In a repository with a large number of refs, the following command line\ncould easily overflow the command line size limitations\n\n git-rev-list $newref $(git-rev-parse --not --all)\n\nFortunately, git-rev-list already has the means to cope with this\nsituation with the --stdin switch\n\n git-rev-parse --not --all | git-rev-list --stdin $newref\n\nWhich is exactly what this patch does.\n\nSigned-off-by: Andy Parkins <andyparkins@gmail.com>\n---\n templates/hooks--update |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/templates/hooks--update b/templates/hooks--update\nindex d4253cb..e8c536f 100644\n--- a/templates/hooks--update\n+++ b/templates/hooks--update\n@@ -148,7 +148,7 @@ case \"$refname_type\" in\n \t\t\t# This shows all log entries that are not already covered by\n \t\t\t# another ref - i.e. commits that are now accessible from this\n \t\t\t# ref that were previously not accessible\n-\t\t\tgit-rev-list --pretty $newref $(git-rev-parse --not --all)\n+\t\t\tgit-rev-parse --not --all | git-rev-list --stdin --pretty $newref\n \t\t\techo $LOGEND\n \t\telse\n \t\t\t# oldrev is valid\n-- \n1.5.0.rc4.364.g85b1\n"},{"id":"34442","messageId":"7v3b5ax7cx.fsf@assigned-by-dhcp.cox.net","threadId":"6798","inReplyTo":"200702131423.58561.andyparkins@gmail.com","subject":"Re: [PATCH 1/3] Fix potential command line overflow in hooks--update","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-02-13T18:03:42Z","receivedAt":"2007-02-13T18:03:42Z","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> In a repository with a large number of refs, the following command line\n> could easily overflow the command line size limitations\n> ...\n\nThanks, applied.\n"}]}