summaryrefslogtreecommitdiff
path: root/builtin-remote.c
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 93bb84e1d4..8b63619ef0 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -118,6 +118,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;