summaryrefslogtreecommitdiff
path: root/refspec.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-06-05 19:54:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-11 17:11:31 (GMT)
commitc495fd3d1b4b6b395346a8832edbea25f0d60ee7 (patch)
tree115691e84ad21446a3b36b9ff4f10afbdc4f3922 /refspec.h
parentdc0642218306190a2d284f47f75d71aeeaa34d02 (diff)
downloadgit-c495fd3d1b4b6b395346a8832edbea25f0d60ee7.zip
git-c495fd3d1b4b6b395346a8832edbea25f0d60ee7.tar.gz
git-c495fd3d1b4b6b395346a8832edbea25f0d60ee7.tar.bz2
refspec: add back a refspec_item_init() function
Re-add the non-fatal version of refspec_item_init_or_die() renamed away in an earlier change to get a more minimal diff. This should be used by callers that have their own error handling. This new function could be marked "static" since nothing outside of refspec.c uses it, but expecting future use of it, let's make it available to other users. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refspec.h')
-rw-r--r--refspec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/refspec.h b/refspec.h
index 4caaf1f..9b6e64a 100644
--- a/refspec.h
+++ b/refspec.h
@@ -32,6 +32,8 @@ struct refspec {
int fetch;
};
+int refspec_item_init(struct refspec_item *item, const char *refspec,
+ int fetch);
void refspec_item_init_or_die(struct refspec_item *item, const char *refspec,
int fetch);
void refspec_item_clear(struct refspec_item *item);