author | Roland Dreier <roland@digitalvampire.org> | |
Sun, 25 Feb 2007 17:34:27 +0000 (09:34 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 25 Feb 2007 18:50:12 +0000 (10:50 -0800) | ||
commit | ffa84ffb77b06f9793967fb4f4dd5c946da8e341 | |
tree | 1e6022bcbb3cb3691af80f55fea5ab2f36ad2215 | tree | snapshot |
parent | 128917274943bd0e2dea69862c5a9893a962e350 | commit | diff |
Allow arbitrary number of arguments to git-pack-objects
If a repository ever gets in a situation where there are too many
packs (more than 60 or so), perhaps because of frequent use of
git-fetch -k or incremental git-repack, then it becomes impossible to
fully repack the repository with git-repack -a. That command just
dies with the cryptic message
fatal: too many internal rev-list options
This message comes from git-pack-objects, which is passed one command
line option like --unpacked=pack-<SHA1>.pack for each pack file to be
repacked. However, the current code has a static limit of 64 command
line arguments and just aborts if more arguments are passed to it.
Fix this by dynamically allocating the array of command line
arguments, and doubling the size each time it overflows.
Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If a repository ever gets in a situation where there are too many
packs (more than 60 or so), perhaps because of frequent use of
git-fetch -k or incremental git-repack, then it becomes impossible to
fully repack the repository with git-repack -a. That command just
dies with the cryptic message
fatal: too many internal rev-list options
This message comes from git-pack-objects, which is passed one command
line option like --unpacked=pack-<SHA1>.pack for each pack file to be
repacked. However, the current code has a static limit of 64 command
line arguments and just aborts if more arguments are passed to it.
Fix this by dynamically allocating the array of command line
arguments, and doubling the size each time it overflows.
Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pack-objects.c | diff | blob | history |