summaryrefslogtreecommitdiff
path: root/templates/hooks--update
diff options
context:
space:
mode:
authorAndy Parkins <andyparkins@gmail.com>2007-02-13 14:23:58 +0000
committerJunio C Hamano <junkio@cox.net>2007-02-13 09:33:09 -0800
commit72f627d2bc860c560e4ea4ee172982b1d38ceca8 (patch)
treeb3c6c5287f43893a309da867f4198dcdef7cc658 /templates/hooks--update
parentc2120e5e4b9f7c548b0c49f914bc0881d7cece6f (diff)
downloadgit-72f627d2bc860c560e4ea4ee172982b1d38ceca8.tar.gz
Fix potential command line overflow in hooks--update
In a repository with a large number of refs, the following command line could easily overflow the command line size limitations git-rev-list $newref $(git-rev-parse --not --all) Fortunately, git-rev-list already has the means to cope with this situation with the --stdin switch git-rev-parse --not --all | git-rev-list --stdin $newref Which is exactly what this patch does. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'templates/hooks--update')
-rw-r--r--templates/hooks--update2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/hooks--update b/templates/hooks--update
index d4253cbcfb..e8c536fb61 100644
--- a/templates/hooks--update
+++ b/templates/hooks--update
@@ -148,7 +148,7 @@ case "$refname_type" in
# This shows all log entries that are not already covered by
# another ref - i.e. commits that are now accessible from this
# ref that were previously not accessible
- git-rev-list --pretty $newref $(git-rev-parse --not --all)
+ git-rev-parse --not --all | git-rev-list --stdin --pretty $newref
echo $LOGEND
else
# oldrev is valid