提交 72f627d2 编写于 作者: A Andy Parkins 提交者: Junio C Hamano

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: NAndy Parkins <andyparkins@gmail.com>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 c2120e5e
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册