@@ -20,7 +20,8 @@
#include "repository.h"
#include "pretty.h"
#include "refs.h"
-#include "exec-cmd.h"
+#include "pager.h"
+#include "log.h"
#include "run-command.h"
#include "parse-options.h"
#include "string-list.h"
@@ -753,7 +754,7 @@ static int show(int argc, const char **argv, const char *prefix)
struct notes_tree *t;
struct object_id object;
const struct object_id *note;
- int retval;
+ int retval = 0;
struct option options[] = {
OPT_END()
};
@@ -778,8 +779,9 @@ static int show(int argc, const char **argv, const char *prefix)
retval = error(_("no note found for object %s."),
oid_to_hex(&object));
else {
- const char *show_args[3] = {"show", oid_to_hex(note), NULL};
- retval = execv_git_cmd(show_args);
+ setup_pager();
+ if (show_blob_object(note, NULL, false))
+ die(_("object %s is not a blob"), oid_to_hex(note));
}
free_notes(t);
return retval;