mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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>
This commit is contained in:
parent
c2120e5e4b
commit
72f627d2bc
|
@ -148,7 +148,7 @@ case "$refname_type" in
|
||||||
# This shows all log entries that are not already covered by
|
# This shows all log entries that are not already covered by
|
||||||
# another ref - i.e. commits that are now accessible from this
|
# another ref - i.e. commits that are now accessible from this
|
||||||
# ref that were previously not accessible
|
# 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
|
echo $LOGEND
|
||||||
else
|
else
|
||||||
# oldrev is valid
|
# oldrev is valid
|
||||||
|
|
Loading…
Reference in a new issue