diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2007-04-24 04:26:26 +0900 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-24 00:08:01 -0700 |
commit | afb5f39e24eadc5933b34cfd17c1089e482d6a6b (patch) | |
tree | 7e6476c38b936cb8f55fdeaea314ed09cf47698f /builtin-fetch--tool.c | |
parent | 2122591b3b5c6d93d3052a3151afcfa3146ede84 (diff) | |
download | git-afb5f39e24eadc5933b34cfd17c1089e482d6a6b.tar.gz |
git-fetch: Fix "argument list too long"
If $ls_remote_result was too long,
git-fetch--tool -s pick-rref "$rref" "$ls_remote_result"
in git-fetch will fail with "argument list too long".
This patch fixes git-fetch--tool and git-fetch by passing
$ls_remote_result via stdin.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-fetch--tool.c')
-rw-r--r-- | builtin-fetch--tool.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c index be341c159f..3145c01f7e 100644 --- a/builtin-fetch--tool.c +++ b/builtin-fetch--tool.c @@ -571,9 +571,13 @@ int cmd_fetch__tool(int argc, const char **argv, const char *prefix) return parse_reflist(reflist); } if (!strcmp("pick-rref", argv[1])) { + const char *ls_remote_result; if (argc != 4) return error("pick-rref takes 2 args"); - return pick_rref(sopt, argv[2], argv[3]); + ls_remote_result = argv[3]; + if (!strcmp(ls_remote_result, "-")) + ls_remote_result = get_stdin(); + return pick_rref(sopt, argv[2], ls_remote_result); } if (!strcmp("expand-refs-wildcard", argv[1])) { const char *reflist; |