commit - a78522637bcc7d3f4120a37fff0673e1bec74430
commit + 365fb436324b33e0a9cb7c2608d81bac879ff93a
blob - fdc0c136e4d89280f9ef8bb0f43d937624cf58e0
blob + b684c9de163b20f5e43023240de23e74bb617937
--- lib/diff.c
+++ lib/diff.c
}
static const struct got_error *
-diff_deleted_blob(struct got_object_id *id)
+diff_deleted_blob(struct got_object_id *id, struct got_repository *repo)
{
- return NULL;
+ const struct got_error *err;
+ struct got_blob_object *blob;
+ struct got_object *obj;
+
+ err = got_object_open(&obj, repo, id);
+ if (err)
+ return err;
+ err = got_object_blob_open(&blob, repo, obj, 512);
+ if (err != NULL)
+ return err;
+
+ return got_diff_blob(blob, NULL, NULL, NULL, stdout);
}
static const struct got_error *
if (te2 == NULL) {
if (S_ISDIR(te1->mode))
return diff_deleted_tree(&te1->id);
- return diff_deleted_blob(&te1->id);
+ return diff_deleted_blob(&te1->id, repo);
}
if (S_ISDIR(te1->mode) && S_ISDIR(te2->mode)) {