From 8b3d9dc0e21eb8c7d90173acb330932569e6f52c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 14 Jul 2005 00:08:37 -0700 Subject: [PATCH] Documentation: clone/fetch/upload. This adds documentation for 'smarter pull' family of commands. Signed-off-by: Junio C Hamano Signed-off-by: Linus Torvalds --- fetch-pack.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'fetch-pack.c') diff --git a/fetch-pack.c b/fetch-pack.c index 0979d3d9b..9b1bc5224 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -3,7 +3,8 @@ #include "pkt-line.h" #include -static const char fetch_pack_usage[] = "git-fetch-pack [host:]directory [heads]* < mycommitlist"; +static int quiet; +static const char fetch_pack_usage[] = "git-fetch-pack [-q] [--exec=upload-pack] [host:]directory [heads]* < mycommitlist"; static const char *exec = "git-upload-pack"; static int find_common(int fd[2], unsigned char *result_sha1, unsigned char *remote) @@ -98,7 +99,8 @@ static int fetch_pack(int fd[2], int nr_match, char **match) dup2(fd[0], 0); close(fd[0]); close(fd[1]); - execlp("git-unpack-objects", "git-unpack-objects", NULL); + execlp("git-unpack-objects", "git-unpack-objects", + quiet ? "-q" : NULL, NULL); die("git-unpack-objects exec failed"); } close(fd[0]); @@ -134,7 +136,10 @@ int main(int argc, char **argv) char *arg = argv[i]; if (*arg == '-') { - /* Arguments go here */ + if (!strncmp("--exec=", arg, 7)) { + exec = arg + 7; + continue; + } usage(fetch_pack_usage); } dest = arg; -- cgit v1.2.1