t6036: criss-cross + rename/rename(1to2)/add-dest + simple modify
[gitweb.git] / builtin / remote.c
index f9522d5d8befd743c63bd5d9c07d9796116b1bcb..8424152269e309cb86e4ff530b9feacc23fc17a6 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "parse-options.h"
 #include "transport.h"
 #include "remote.h"
@@ -136,13 +136,19 @@ static int add_branch(const char *key, const char *branchname,
        return git_config_set_multivar(key, tmp->buf, "^$", 0);
 }
 
+static const char mirror_advice[] =
+"--mirror is dangerous and deprecated; please\n"
+"\t use --mirror=fetch or --mirror=push instead";
+
 static int parse_mirror_opt(const struct option *opt, const char *arg, int not)
 {
        unsigned *mirror = opt->value;
        if (not)
                *mirror = MIRROR_NONE;
-       else if (!arg)
+       else if (!arg) {
+               warning("%s", mirror_advice);
                *mirror = MIRROR_BOTH;
+       }
        else if (!strcmp(arg, "fetch"))
                *mirror = MIRROR_FETCH;
        else if (!strcmp(arg, "push"))