summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorPaul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com>2019-02-25 23:16:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-28 23:03:46 (GMT)
commitf5116f43f69720059375059311485d99c462551b (patch)
treec6568906ccd64e06db803295ab9b788d3e8a6fa1 /cache.h
parenteacdb4d2f4895b1fe5aa7e745a5559571f3f6b06 (diff)
downloadgit-f5116f43f69720059375059311485d99c462551b.zip
git-f5116f43f69720059375059311485d99c462551b.tar.gz
git-f5116f43f69720059375059311485d99c462551b.tar.bz2
sha1-name.c: add `get_oidf()` which acts like `get_oid()`
Compared to `get_oid()`, `get_oidf()` has as parameters a pointer to `object_id`, a printf format string and additional arguments. This will help simplify the code in subsequent commits. Original-idea-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Paul-Sebastian Ungureanu <ungureanupaulsebastian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index ca36b44..7b6b89f 100644
--- a/cache.h
+++ b/cache.h
@@ -1333,6 +1333,7 @@ struct object_context {
GET_OID_BLOB)
extern int get_oid(const char *str, struct object_id *oid);
+extern int get_oidf(struct object_id *oid, const char *fmt, ...);
extern int get_oid_commit(const char *str, struct object_id *oid);
extern int get_oid_committish(const char *str, struct object_id *oid);
extern int get_oid_tree(const char *str, struct object_id *oid);