Thread (19 messages) flat view 19 messages, 3 authors, 2016-06-15

Re: 'git grep needle rev' attempts to access 'rev:.../.gitattributes' in the worktree

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:54:59

Possibly related (same subject, not in this thread)

On Wed, Oct 10, 2012 at 1:59 AM, Junio C Hamano [off-list ref] wrote:
Jeff King [off-list ref] writes:
quoted
I think we just need to have callers of grep_source_init provide us with
the actual pathname (or NULL, in the case of GREP_SOURCE_BUF). That is
where the information is lost.
Yes.  I agree that is the right approach.
Here we go. No additional tests as I don't know how to write them. But
strace shows it's ok.

Currently we don't have many options to optimize attr access. We
cannot prepare a attr stack in advance for a specific directory, then
check attributes many times using the stack. We cannot prepare attr
stack from a tree object. As a result a normal "grep pattern --"
results in a lot of duplicate failed open(".../.gitattributes") calls.

Jeff King (1):
  grep: pass true path name to grep machinery

Nguyễn Thái Ngọc Duy (2):
  quote: let caller reset buffer for quote_path_relative()
  grep: stop looking at random places for .gitattributes

 Documentation/git-grep.txt |  7 +++++--
 builtin/clean.c            |  2 ++
 builtin/grep.c             | 19 ++++++++++++-------
 builtin/ls-files.c         |  1 +
 grep.c                     | 11 ++++++++---
 grep.h                     |  4 +++-
 quote.c                    |  1 -
 wt-status.c                |  1 +
 8 files changed, 32 insertions(+), 14 deletions(-)

-- 
1.7.12.1.406.g6ab07c4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help