MCPcopy Create free account
hub / github.com/git/git / get_oidf

Function get_oidf

object-name.c:1548–1562  ·  view source on GitHub ↗

* This returns a non-zero value if the string (built using printf * format and the given arguments) is not a valid object. */

Source from the content-addressed store, hash-verified

1546 * format and the given arguments) is not a valid object.
1547 */
1548int get_oidf(struct object_id *oid, const char *fmt, ...)
1549{
1550 va_list ap;
1551 int ret;
1552 struct strbuf sb = STRBUF_INIT;
1553
1554 va_start(ap, fmt);
1555 strbuf_vaddf(&sb, fmt, ap);
1556 va_end(ap);
1557
1558 ret = repo_get_oid(the_repository, sb.buf, oid);
1559 strbuf_release(&sb);
1560
1561 return ret;
1562}
1563
1564/*
1565 * Many callers know that the user meant to name a commit-ish by

Callers 3

assert_stash_likeFunction · 0.85
get_stash_infoFunction · 0.85
bisect_startFunction · 0.85

Calls 3

strbuf_vaddfFunction · 0.85
repo_get_oidFunction · 0.85
strbuf_releaseFunction · 0.85

Tested by

no test coverage detected