diff options
Diffstat (limited to 'diff.c')
| -rw-r--r-- | diff.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -5139,6 +5139,8 @@ static int diff_opt_find_object(const struct option *option, struct object_id oid; BUG_ON_OPT_NEG(unset); + if (!startup_info->have_repository) + return error(_("--find-object requires a git repository")); if (repo_get_oid(the_repository, arg, &oid)) return error(_("unable to resolve '%s'"), arg); |
