fetch, remote: properly convey --no-prune options to subprocesses
If --no-prune is passed to one of the following commands: git fetch --all git fetch --multiple git fetch --recurse-submodules git remote update then it must also be passed to the "fetch" subprocesses that those commands use to do their work. Otherwise there might be a fetch.prune or remote.<name>.prune configuration setting that causes pruning to occur, contrary to the user's express wish. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
8607590e74
commit
90765fa3e0
@ -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)
|
||||
|
Reference in New Issue
Block a user