git-grep misses an instance of a string (after conflict)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've roughly had the following sequence of operations on a particular file
in my project:

1. git-cherry-pick a commit, which resulted in a conflict in in that file
2. edit the file to insert a particular string (which wasn't there before)
3. then:

$ git-grep getSibling -- kdbg/exprwnd.h    # this file had a conflict
$ grep getSibling -- kdbg/exprwnd.h       
    { return static_cast<VarTree*>(getSibling()); }
$ git-update-index kdbg/exprwnd.h
$ git-grep getSibling -- kdbg/exprwnd.h       
kdbg/exprwnd.h:    { return static_cast<VarTree*>(getSibling()); }

As you can see, the first git-grep doesn't find the string, but after the
update-index, it does find it.

This is unexpected behavior, in particular since the manual page talks about
git-grep to search the working tree. I understand that the conflict may
have influenced the behavior, but the manual page is not in line with the
behavior. Am I missing something?

-- Hannes


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]