From: Junio C Hamano Date: Sun, 16 Oct 2011 03:27:19 +0000 (-0700) Subject: Merge branch 'jc/grep-untracked-exclude' X-Git-Tag: v1.7.8-rc0~71 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/efe7aecbceb7ce0ea61f320dfbfb9e8e23f60de6?ds=inline;hp=-c Merge branch 'jc/grep-untracked-exclude' * jc/grep-untracked-exclude: grep: fix the error message that mentions --exclude --- efe7aecbceb7ce0ea61f320dfbfb9e8e23f60de6 diff --combined builtin/grep.c index 024b87868a,14b05a43bc..7d0779f6cf --- a/builtin/grep.c +++ b/builtin/grep.c @@@ -598,11 -598,8 +598,11 @@@ static int grep_object(struct grep_opt struct strbuf base; int hit, len; + read_sha1_lock(); data = read_object_with_reference(obj->sha1, tree_type, &size, NULL); + read_sha1_unlock(); + if (!data) die(_("unable to read tree (%s)"), sha1_to_hex(obj->sha1)); @@@ -1064,7 -1061,7 +1064,7 @@@ int cmd_grep(int argc, const char **arg die(_("--no-index or --untracked cannot be used with revs.")); hit = grep_directory(&opt, &pathspec, use_exclude); } else if (0 <= opt_exclude) { - die(_("--exclude or --no-exclude cannot be used for tracked contents.")); + die(_("--[no-]exclude-standard cannot be used for tracked contents.")); } else if (!list.nr) { if (!cached) setup_work_tree();