Merge branch 'en/t6042-insane-merge-rename-testcases'
[gitweb.git] / builtin / grep.c
index ee753a403eba0e9bc25b40a1efd200cafdf31e19..f9678f19e4aff52ae82ee1ff5d9842950b943f43 100644 (file)
@@ -647,7 +647,8 @@ static int grep_objects(struct grep_opt *opt, const struct pathspec *pathspec,
 
        for (i = 0; i < nr; i++) {
                struct object *real_obj;
-               real_obj = deref_tag(list->objects[i].item, NULL, 0);
+               real_obj = deref_tag(the_repository, list->objects[i].item,
+                                    NULL, 0);
 
                /* load the gitmodules file for this rev */
                if (recurse_submodules) {
@@ -828,6 +829,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
                            GREP_PATTERN_TYPE_PCRE),
                OPT_GROUP(""),
                OPT_BOOL('n', "line-number", &opt.linenum, N_("show line numbers")),
+               OPT_BOOL(0, "column", &opt.columnnum, N_("show column number of first match")),
                OPT_NEGBIT('h', NULL, &opt.pathname, N_("don't show filenames"), 1),
                OPT_BIT('H', NULL, &opt.pathname, N_("show filenames"), 1),
                OPT_NEGBIT(0, "full-name", &opt.relative,