mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
object-name: introduce repo_get_oid_with_flags()
Introduce a new function `repo_get_oid_with_flags()`. This function behaves the same as `repo_get_oid()`, except that it takes an extra `flags` parameter that it ends up passing to `get_oid_with_context()`. This function will be used in a subsequent commit. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
08bdfd4535
commit
37e7546b91
@@ -51,6 +51,12 @@ void strbuf_repo_add_unique_abbrev(struct strbuf *sb, struct repository *repo,
|
||||
void strbuf_add_unique_abbrev(struct strbuf *sb, const struct object_id *oid,
|
||||
int abbrev_len);
|
||||
|
||||
/*
|
||||
* This is like "get_oid_basic()", except it allows "object ID expressions",
|
||||
* notably "xyz^" for "parent of xyz". Accepts GET_OID_* flags.
|
||||
*/
|
||||
int repo_get_oid_with_flags(struct repository *r, const char *str,
|
||||
struct object_id *oid, unsigned flags);
|
||||
int repo_get_oid(struct repository *r, const char *str, struct object_id *oid);
|
||||
__attribute__((format (printf, 2, 3)))
|
||||
int get_oidf(struct object_id *oid, const char *fmt, ...);
|
||||
|
||||
Reference in New Issue
Block a user