@matheusbsbs / matheus-bagliano / commits / 72f627d2bc
Fork 0

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>

Andy Parkins committed Feb 13, 2007 at 14:23 UTC 72f627d2bc860c560e4ea4ee172982b1d38ceca8
1 file changed +1 -1
templates/hooks--update
+1 -1
@@ -148,7 +148,7 @@ case "$refname_type" in
148 # This shows all log entries that are not already covered by
149 # another ref - i.e. commits that are now accessible from this
150 # ref that were previously not accessible
151 - git-rev-list --pretty $newref $(git-rev-parse --not --all)
151 + git-rev-parse --not --all | git-rev-list --stdin --pretty $newref
152 echo $LOGEND
153 else
154 # oldrev is valid