Junio C Hamano <gitster@xxxxxxxxx> writes: Sorry, one shouldn't type while being sick and in bed X-<. > I am not sure if you are shooting for is "work correctly" to begin > with, to be honest. The current code always shows the "correct" > output which is "the tree-ish object name (expressed in a way easier > to understand by the humans), followed by a colon, followed by the > path in the tree-ish the hit lies". You are making it "incorrect > but often more convenient", and sometimes that is a worth goal, but s/worth/&y/; > for the particular use cases you presented, i.e. > > $ git grep -e "$pattern" "$commit:path" > > a more natural way to express "I want to find this pattern in the > commit under that path" exists: > > $ git grep -e "$pattern" "$commit" -- path > > and because of that, I do not think the former form of the query s/do not think/do think/ > should happen _less_ often in the first place, which would make it > "incorrect but more convenient if the user gives an unusual query". > > So I am not sure if the change to "grep" is worth it. Also, it may be fairer to do s/incorrect/inconsistent/.