summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-06 19:17:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-06 19:17:55 (GMT)
commit72e719292d5dd6e037fecbc3a1c5e4d4f21f03b8 (patch)
tree239f589cfc197cc5fb839ace54e244dc9dc5f632 /git.c
parent9d54f97e34a92d1504f24a5896e9741111f38d79 (diff)
parentc6807a40dcd29f7e5ad1e2f4fc44f1729c9afa11 (diff)
downloadgit-72e719292d5dd6e037fecbc3a1c5e4d4f21f03b8.zip
git-72e719292d5dd6e037fecbc3a1c5e4d4f21f03b8.tar.gz
git-72e719292d5dd6e037fecbc3a1c5e4d4f21f03b8.tar.bz2
Merge branch 'nd/clone-connectivity-shortcut'
Special case "git clone" and use lighter-weight implementation to check the completeness of the history behind refs. * nd/clone-connectivity-shortcut: clone: open a shortcut for connectivity check index-pack: remove dead code (it should never happen) fetch-pack: prepare updated shallow file before fetching the pack clone: let the user know when check_everything_connected is run
Diffstat (limited to 'git.c')
-rw-r--r--git.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/git.c b/git.c
index 7dd07aa..4359086 100644
--- a/git.c
+++ b/git.c
@@ -4,6 +4,7 @@
#include "help.h"
#include "quote.h"
#include "run-command.h"
+#include "commit.h"
const char git_usage_string[] =
"git [--version] [--help] [-c name=value]\n"
@@ -146,6 +147,12 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
setenv(GIT_LITERAL_PATHSPECS_ENVIRONMENT, "0", 1);
if (envchanged)
*envchanged = 1;
+ } else if (!strcmp(cmd, "--shallow-file")) {
+ (*argv)++;
+ (*argc)--;
+ set_alternate_shallow_file((*argv)[0]);
+ if (envchanged)
+ *envchanged = 1;
} else {
fprintf(stderr, "Unknown option: %s\n", cmd);
usage(git_usage_string);