Skip to content

Commit 61e921a

Browse files
committed
fixup! sha1-name.c: add get_oidf() which acts like get_oid()
In preparation for a newer patch series. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 02f8005 commit 61e921a

File tree

2 files changed

+0
-20
lines changed

2 files changed

+0
-20
lines changed

cache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,6 @@ enum get_oid_result {
13531353
};
13541354

13551355
extern int get_oid(const char *str, struct object_id *oid);
1356-
extern int get_oidf(struct object_id *oid, const char *fmt, ...);
13571356
extern int get_oid_commit(const char *str, struct object_id *oid);
13581357
extern int get_oid_committish(const char *str, struct object_id *oid);
13591358
extern int get_oid_tree(const char *str, struct object_id *oid);

sha1-name.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,25 +1518,6 @@ int get_oid(const char *name, struct object_id *oid)
15181518
return get_oid_with_context(the_repository, name, 0, oid, &unused);
15191519
}
15201520

1521-
/*
1522-
* This returns a non-zero value if the string (built using printf
1523-
* format and the given arguments) is not a valid object.
1524-
*/
1525-
int get_oidf(struct object_id *oid, const char *fmt, ...)
1526-
{
1527-
va_list ap;
1528-
int ret;
1529-
struct strbuf sb = STRBUF_INIT;
1530-
1531-
va_start(ap, fmt);
1532-
strbuf_vaddf(&sb, fmt, ap);
1533-
va_end(ap);
1534-
1535-
ret = get_oid(sb.buf, oid);
1536-
strbuf_release(&sb);
1537-
1538-
return ret;
1539-
}
15401521

15411522
/*
15421523
* Many callers know that the user meant to name a commit-ish by

0 commit comments

Comments
 (0)