{"thread":{"id":"47238","subject":"[PATCH] git-pull: Pass -4/-6 option to git-fetch","startedAt":"2017-11-19T14:38:25Z","lastAt":"2017-11-19T14:38:25Z","messageCount":1,"participants":["Shuyu Wei"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"332849","messageId":"20171119143757.ysab7jnfswp7lgqi@home.dogben.com","threadId":"47238","inReplyTo":null,"subject":"[PATCH] git-pull: Pass -4/-6 option to git-fetch","fromName":"Shuyu Wei","fromEmail":"wsy@dogben.com","sentAt":"2017-11-19T14:37:57Z","receivedAt":"2017-11-19T14:38:25Z","isPatch":true,"sender":{"key":"wsy@dogben.com","avatar":"https://avatars.githubusercontent.com/u/7259503?v=4"},"body":"The -4/-6 option should be passed through to git-fetch\nto be consistent with the git-pull man page.\n\nSigned-off-by: Wei Shuyu <wsy@dogben.com>\n---\n builtin/pull.c | 12 ++++++++++++\n 1 file changed, 12 insertions(+)\n\ndiff --git a/builtin/pull.c b/builtin/pull.c\nindex f7e2c4f2e..166b777ed 100644\n--- a/builtin/pull.c\n+++ b/builtin/pull.c\n@@ -113,6 +113,8 @@ static char *opt_depth;\n static char *opt_unshallow;\n static char *opt_update_shallow;\n static char *opt_refmap;\n+static char *opt_ipv4;\n+static char *opt_ipv6;\n \n static struct option pull_options[] = {\n \t/* Shared options */\n@@ -218,6 +220,12 @@ static struct option pull_options[] = {\n \tOPT_PASSTHRU(0, \"refmap\", &opt_refmap, N_(\"refmap\"),\n \t\tN_(\"specify fetch refmap\"),\n \t\tPARSE_OPT_NONEG),\n+\tOPT_PASSTHRU('4',  \"ipv4\", &opt_ipv4, NULL,\n+\t\tN_(\"use IPv4 addresses only\"),\n+\t\tPARSE_OPT_NOARG),\n+\tOPT_PASSTHRU('6',  \"ipv6\", &opt_ipv6, NULL,\n+\t\tN_(\"use IPv6 addresses only\"),\n+\t\tPARSE_OPT_NOARG),\n \n \tOPT_END()\n };\n@@ -522,6 +530,10 @@ static int run_fetch(const char *repo, const char **refspecs)\n \t\targv_array_push(&args, opt_update_shallow);\n \tif (opt_refmap)\n \t\targv_array_push(&args, opt_refmap);\n+\tif (opt_ipv4)\n+\t\targv_array_push(&args, opt_ipv4);\n+\tif (opt_ipv6)\n+\t\targv_array_push(&args, opt_ipv6);\n \n \tif (repo) {\n \t\targv_array_push(&args, repo);\n-- \n2.15.0\n\n\n"}]}