summaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-07-14 00:08:37 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-14 08:54:31 -0700
commit8b3d9dc0e21eb8c7d90173acb330932569e6f52c (patch)
tree6a377210cd97c2c231a51630a23859d984be5373 /fetch-pack.c
parent5f40520f8c4ca24b29295a36c7a7b6059ad5a888 (diff)
downloadgit-8b3d9dc0e21eb8c7d90173acb330932569e6f52c.tar.gz
[PATCH] Documentation: clone/fetch/upload.
This adds documentation for 'smarter pull' family of commands. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index 0979d3d9b6..9b1bc52244 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -3,7 +3,8 @@
#include "pkt-line.h"
#include <sys/wait.h>
-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;