* This returns a non-zero value if the string (built using printf * format and the given arguments) is not a valid object. */
| 1546 | * format and the given arguments) is not a valid object. |
| 1547 | */ |
| 1548 | int 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 |
no test coverage detected