Make the new --prune-tags option work properly when git-fetch is
invoked with a <url> parameter instead of a <remote name>
parameter.
This change is split off from the introduction of --prune-tags due to
the relative complexity of munging the incoming argv, which is easier
to review as a separate change.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Ævar Arnfjörð Bjarmason7 years agocommitted byJunio C Hamano
@ -175,24 +175,15 @@ It's reasonable to e.g. configure `fetch.pruneTags=true` in
@@ -175,24 +175,15 @@ It's reasonable to e.g. configure `fetch.pruneTags=true` in
run, without making every invocation of `git fetch` without `--prune`
an error.
Another special case of `--prune-tags` is that
`refs/tags/*:refs/tags/*` will not be implicitly provided if an URL is
being fetched. I.e.:
------------------------------------------------
$ git fetch <url> --prune --prune-tags
------------------------------------------------
Will prune no tags, as opposed to:
Pruning tags with `--prune-tags` also works when fetching a URL
instead of a named remote. These will all prune tags not found on
origin:
------------------------------------------------
$ git fetch origin --prune --prune-tags
------------------------------------------------
To prune tags given a URL supply the refspec explicitly: