Merge branch 'jc/grep-untracked-exclude'
authorJunio C Hamano <gitster@pobox.com>
Sun, 16 Oct 2011 03:27:19 +0000 (20:27 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Oct 2011 03:27:19 +0000 (20:27 -0700)
* jc/grep-untracked-exclude:
grep: fix the error message that mentions --exclude

1  2 
builtin/grep.c
diff --combined builtin/grep.c
index 024b87868aaf6b57b4af01feecf671cad664433c,14b05a43bcc98f0e0ccb1bf1ca8f219a4a01fe61..7d0779f6cfd60149379f957941ebef18aef735ab
@@@ -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();