summaryrefslogtreecommitdiff
path: root/builtin/prune.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-01 02:28:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-02 01:46:41 (GMT)
commitaf6730e7303d3025a8f50192e0f54acc74142484 (patch)
tree31c5ee3b84b02af89bab326e2d416ae5ce7d6022 /builtin/prune.c
parent511dca80cce868237b2b64f909ed83863fcf5455 (diff)
downloadgit-af6730e7303d3025a8f50192e0f54acc74142484.zip
git-af6730e7303d3025a8f50192e0f54acc74142484.tar.gz
git-af6730e7303d3025a8f50192e0f54acc74142484.tar.bz2
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 <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/prune.c')
-rw-r--r--builtin/prune.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/prune.c b/builtin/prune.c
index 42633e0..96dca7d 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -123,11 +123,11 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
die(_("cannot prune in a precious-objects repo"));
while (argc--) {
- unsigned char sha1[20];
+ struct object_id oid;
const char *name = *argv++;
- if (!get_sha1(name, sha1)) {
- struct object *object = parse_object_or_die(sha1, name);
+ if (!get_oid(name, &oid)) {
+ struct object *object = parse_object_or_die(oid.hash, name);
add_pending_object(&revs, object, "");
}
else