* [PATCH 1/3] Fix potential command line overflow in hooks--update
@ 2007-02-13 14:23 Andy Parkins
2007-02-13 18:03 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Andy Parkins @ 2007-02-13 14:23 UTC (permalink / raw)
To: git
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>
---
templates/hooks--update | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/templates/hooks--update b/templates/hooks--update
index d4253cb..e8c536f 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
--
1.5.0.rc4.364.g85b1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] Fix potential command line overflow in hooks--update
2007-02-13 14:23 [PATCH 1/3] Fix potential command line overflow in hooks--update Andy Parkins
@ 2007-02-13 18:03 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2007-02-13 18:03 UTC (permalink / raw)
To: Andy Parkins; +Cc: git
Andy Parkins <andyparkins@gmail.com> writes:
> In a repository with a large number of refs, the following command line
> could easily overflow the command line size limitations
> ...
Thanks, applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-13 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 14:23 [PATCH 1/3] Fix potential command line overflow in hooks--update Andy Parkins
2007-02-13 18:03 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.