remote: add a macro for "refs/tags/*:refs/tags/*"

Add a macro with the refspec string "refs/tags/*:refs/tags/*". There's
been a pre-defined struct version of this since e0aaa29ff3 ("Have a
constant extern refspec for "--tags"", 2008-04-17), but nothing that
could be passed to e.g. add_fetch_refspec().

This will be used in subsequent commits to avoid hardcoding this
string in multiple places.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ævar Arnfjörð Bjarmason
2018-02-09 20:32:03 +00:00
committed by Junio C Hamano
parent 0711883218
commit 750d0da9cf
2 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ static struct refspec s_tag_refspec = {
"refs/tags/*"
};
/* See TAG_REFSPEC for the string version */
const struct refspec *tag_refspec = &s_tag_refspec;
struct counted_string {