Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-remote.c')
-rw-r--r--builtin-remote.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin-remote.c b/builtin-remote.c
index a3ee1ac393..9d4432bcd5 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -117,6 +117,13 @@ static int add(int argc, const char **argv)
return 1;
}
+ if (mirror) {
+ strbuf_reset(&buf);
+ strbuf_addf(&buf, "remote.%s.mirror", name);
+ if (git_config_set(buf.buf, "yes"))
+ return 1;
+ }
+
if (fetch && fetch_remote(name))
return 1;