refspec: s/refspec_item_init/&_or_die/g

Rename the refspec_item_init() function introduced in
6d4c057859 ("refspec: introduce struct refspec", 2018-05-16) to
refspec_item_init_or_die().

This follows the convention of other *_or_die() functions, and is done
in preparation for making it a wrapper for a non-fatal variant.

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-06-05 19:54:38 +00:00
committed by Junio C Hamano
parent 6c301adb0a
commit dc06422183
4 changed files with 7 additions and 5 deletions

View File

@ -680,7 +680,7 @@ static const char *get_tracking_branch(const char *remote, const char *refspec)
const char *spec_src;
const char *merge_branch;
refspec_item_init(&spec, refspec, REFSPEC_FETCH);
refspec_item_init_or_die(&spec, refspec, REFSPEC_FETCH);
spec_src = spec.src;
if (!*spec_src || !strcmp(spec_src, "HEAD"))
spec_src = "HEAD";