Re: [PATCH 1/2] Update :/abc ambiguity check

2013-01-21 Thread Junio C Hamano
Duy Nguyen writes: >>> ... take ":/abc" as rev even it's ambiguous. This patch makes it: >>> >>> - ambiguous when "abc" exists on worktree >>> - a rev if abc does not exist on worktree >>> - a path if abc is not found in any commits (although better use >> >> The "any commits" above sounds very s

Re: [PATCH 1/2] Update :/abc ambiguity check

2013-01-21 Thread Duy Nguyen
On Tue, Jan 22, 2013 at 2:27 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> :/abc may mean two things: >> >> - as a revision, it means the revision that has "abc" in commit >> message. >> >> - as a pathpec, it means "abc" from root. >> >> Currently we see ":/abc" as a rev (most

Re: [PATCH 1/2] Update :/abc ambiguity check

2013-01-21 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > :/abc may mean two things: > > - as a revision, it means the revision that has "abc" in commit > message. > > - as a pathpec, it means "abc" from root. > > Currently we see ":/abc" as a rev (most of the time), but never see it > as a pathspec even if "abc" exists

[PATCH 1/2] Update :/abc ambiguity check

2013-01-21 Thread Nguyễn Thái Ngọc Duy
:/abc may mean two things: - as a revision, it means the revision that has "abc" in commit message. - as a pathpec, it means "abc" from root. Currently we see ":/abc" as a rev (most of the time), but never see it as a pathspec even if "abc" exists and "git log :/abc" will gladly take ":/abc" a