diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2018-02-09 20:32:16 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 13:10:13 -0800 |
commit | 6317972cff9b4df7a6cc666b08be7133ba81617c (patch) | |
tree | acbb3ab75f127187d608c7fe9f1b07dc5334d7a8 /Documentation | |
parent | fetch: add a --prune-tags option and fetch.pruneTags config (diff) | |
download | tgif-6317972cff9b4df7a6cc666b08be7133ba81617c.tar.xz |
fetch: make the --prune-tags work with <url>
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>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-fetch.txt | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt index af12310f75..e319935597 100644 --- a/Documentation/git-fetch.txt +++ b/Documentation/git-fetch.txt @@ -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: - ------------------------------------------------- -$ git fetch <url> --prune 'refs/tags/*:refs/tags/*' +$ git fetch origin --prune 'refs/tags/*:refs/tags/*' +$ git fetch <url of origin> --prune --prune-tags +$ git fetch <url of origin> --prune 'refs/tags/*:refs/tags/*' ------------------------------------------------ OUTPUT |