Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
pull: pass -4/-6 option to 'git fetch'
author
Shuyu Wei
<wsy@dogben.com>
Sun, 19 Nov 2017 11:01:32 +0000
(19:01 +0800)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 21 Nov 2017 00:53:48 +0000
(09:53 +0900)
The -4/-6 option should be passed through to 'git fetch' to be
consistent with the man page.
Signed-off-by: Wei Shuyu <wsy@dogben.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pull.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
42e6fde
)
diff --git
a/builtin/pull.c
b/builtin/pull.c
index 42f0560252e000310aa8cc8e674890a09a90b471..ef22659a5c177c66adaf3511422180f5783f83d5 100644
(file)
--- a/
builtin/pull.c
+++ b/
builtin/pull.c
@@
-109,6
+109,8
@@
static char *opt_depth;
static char *opt_unshallow;
static char *opt_update_shallow;
static char *opt_refmap;
static char *opt_unshallow;
static char *opt_update_shallow;
static char *opt_refmap;
+static char *opt_ipv4;
+static char *opt_ipv6;
static struct option pull_options[] = {
/* Shared options */
static struct option pull_options[] = {
/* Shared options */
@@
-211,6
+213,12
@@
static struct option pull_options[] = {
OPT_PASSTHRU(0, "refmap", &opt_refmap, N_("refmap"),
N_("specify fetch refmap"),
PARSE_OPT_NONEG),
OPT_PASSTHRU(0, "refmap", &opt_refmap, N_("refmap"),
N_("specify fetch refmap"),
PARSE_OPT_NONEG),
+ OPT_PASSTHRU('4', "ipv4", &opt_ipv4, NULL,
+ N_("use IPv4 addresses only"),
+ PARSE_OPT_NOARG),
+ OPT_PASSTHRU('6', "ipv6", &opt_ipv6, NULL,
+ N_("use IPv6 addresses only"),
+ PARSE_OPT_NOARG),
OPT_END()
};
OPT_END()
};
@@
-500,6
+508,10
@@
static int run_fetch(const char *repo, const char **refspecs)
argv_array_push(&args, opt_update_shallow);
if (opt_refmap)
argv_array_push(&args, opt_refmap);
argv_array_push(&args, opt_update_shallow);
if (opt_refmap)
argv_array_push(&args, opt_refmap);
+ if (opt_ipv4)
+ argv_array_push(&args, opt_ipv4);
+ if (opt_ipv6)
+ argv_array_push(&args, opt_ipv6);
if (repo) {
argv_array_push(&args, repo);
if (repo) {
argv_array_push(&args, repo);