diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2018-06-05 19:54:38 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-06-11 10:11:29 -0700 |
commit | dc0642218306190a2d284f47f75d71aeeaa34d02 (patch) | |
tree | 451dfbc97aa5805f5287fd5b06caf82f700b7036 /builtin | |
parent | fetch: do not pass ref-prefixes for fetch by exact SHA1 (diff) | |
download | tgif-dc0642218306190a2d284f47f75d71aeeaa34d02.tar.xz |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/clone.c | 2 | ||||
-rw-r--r-- | builtin/pull.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 8c5f4d8f07..05cd230973 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -1077,7 +1077,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix) if (option_required_reference.nr || option_optional_reference.nr) setup_reference(); - refspec_item_init(&refspec, value.buf, REFSPEC_FETCH); + refspec_item_init_or_die(&refspec, value.buf, REFSPEC_FETCH); strbuf_reset(&value); diff --git a/builtin/pull.c b/builtin/pull.c index 09575fd23c..af9306ecdc 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -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"; |