Addresses Junio's comments on v2 + more fixes. The Ævar Arnfjörð Bjarmason (11): fetch: don't redundantly NULL something calloc() gave us fetch: stop accessing "remote" variable indirectly Moved these patches to the beginning. No changes except a note to the commit message saying how these trivial changes relate (or not) to subsequent changes. fetch tests: refactor in preparation for testing tag pruning No changes. fetch tests: re-arrange arguments for future readability s/arrange/re-arrange/ in commit message subject. fetch tests: add a tag to be deleted to the pruning tests No changes. fetch tests: test --prune and refspec interaction I'm now just skipping quoting things like +refs/... on the command-line, which as grepping the rest of the test suite shows is fine, this eliminated the need for "fetch tests: double quote a variable for interpolation" so I've ejected it. git fetch doc: add a new section to explain the ins & outs of pruning No changes. git remote doc: correct dangerous lies about what prune does Rewording of doc per Junio's suggestion. git-fetch & config doc: link to the new PRUNING section No changes. fetch tests: add scaffolding for the new fetch.pruneTags No changes except continuing remove refspec quoting changes noted above & using +refs/tags/... instead of refs/tags/... for consistency with the last patch... fetch: add a --fetch-prune option and fetch.pruneTags config We now consistently use a + prefixed refspec for tag pruning, even though it yields the same result. See the discussion in 87tvvdh2vh.fsf@xxxxxxxxxxxxxxxxxxx, I think it's less confusing. Fix regex in --replace-all command in the commit message. Rewording to address Junio's comments. The short help for --prune-tags is now: - N_("prune local tags not found on remote")), + N_("prune local tags no longer on remote and clobber changed tags")), Add --prune-tags to the bash completion. Documentation/config.txt | 20 ++++- Documentation/fetch-options.txt | 18 +++- Documentation/git-fetch.txt | 76 +++++++++++++++++ Documentation/git-remote.txt | 14 +-- builtin/fetch.c | 37 +++++++- contrib/completion/git-completion.bash | 2 +- remote.c | 5 +- remote.h | 3 + t/t5510-fetch.sh | 152 ++++++++++++++++++++++++--------- 9 files changed, 275 insertions(+), 52 deletions(-) -- 2.15.1.424.g9478a66081