Skip to content

Commit af6730e

Browse files
bk2204gitster
authored andcommitted
builtin/prune: convert to struct object_id
Convert the sole instance of unsigned char [20] to struct object_id. cmd_prune is a caller of parse_object, which we will convert later. Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 511dca8 commit af6730e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/prune.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
123123
die(_("cannot prune in a precious-objects repo"));
124124

125125
while (argc--) {
126-
unsigned char sha1[20];
126+
struct object_id oid;
127127
const char *name = *argv++;
128128

129-
if (!get_sha1(name, sha1)) {
130-
struct object *object = parse_object_or_die(sha1, name);
129+
if (!get_oid(name, &oid)) {
130+
struct object *object = parse_object_or_die(oid.hash, name);
131131
add_pending_object(&revs, object, "");
132132
}
133133
else

0 commit comments

Comments
 (0)