t5536: new test of refspec conflicts when fetching
[gitweb.git] / builtin / fetch.c
index 1514b908d85b27ab6a6e179f8a71d3786ad19b52..5ddb9af05c107e09c453e2e4464c1075a9afec14 100644 (file)
@@ -936,8 +936,8 @@ static void add_options_to_argv(struct argv_array *argv)
 {
        if (dry_run)
                argv_array_push(argv, "--dry-run");
-       if (prune > 0)
-               argv_array_push(argv, "--prune");
+       if (prune != -1)
+               argv_array_push(argv, prune ? "--prune" : "--no-prune");
        if (update_head_ok)
                argv_array_push(argv, "--update-head-ok");
        if (force)