git log fails if branch name matches file/dir name

Bug #1144800 reported by Marcin Cieślak
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MediaWiki
Fix Released
Low
git-review
Fix Released
Undecided
Unassigned

Bug Description

This is a friend to bug 1096180, submitted at Wikimedia as https://bugzilla.wikimedia.org/show_bug.cgi?id=38951

Had trouble running git log --decorate --oneline sql --not
remotes/gerrit/master
fatal: ambiguous argument 'sql': both revision and filename
Use '--' to separate filenames from revisions

Revision history for this message
In , Nikerabbit (niklas-laxstrom) wrote :

Had trouble running git log --decorate --oneline sql --not remotes/gerrit/master
fatal: ambiguous argument 'sql': both revision and filename
Use '--' to separate filenames from revisions

Revision history for this message
In , Nikerabbit (niklas-laxstrom) wrote :

Minor: workaround exists

Revision history for this message
In , Marcin-cieslak (marcin-cieslak) wrote :
Revision history for this message
Timo Tijhof (krinklemail) wrote :

git co -b example
touch example
git commit -m "example"
git review

Had trouble running git log --color=always --decorate --oneline example --not remotes/gerrit/master
fatal: ambiguous argument 'example': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Revision history for this message
In , Marcin-cieslak (marcin-cieslak) wrote :

The problem as described was fixed already in git-review master (https://review.openstack.org/#/c/19816/)
but I have submitted another corner case in https://review.openstack.org/#/c/23495/

Changed in mediawiki:
importance: Unknown → Low
status: Unknown → Confirmed
Changed in git-review:
status: New → Fix Committed
Revision history for this message
In , Marcin-cieslak (marcin-cieslak) wrote :

All fixes have been committed to the git master of git-review.

Changed in mediawiki:
status: Confirmed → Fix Released
Revision history for this message
Jeremy Stanley (fungi) wrote :

Both patches mentioned appear in 1.21.

Changed in git-review:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.