Skip to content

satellite: use double-dash to disambiguate refspec and pathspec

Witrem requested to merge github/fork/davvid/disambiguate-refs-and-paths into master

Created by: davvid

When a file or directory is named the same as either the source or target branch then git will fail to diff because of the ambiguity. e.g. if you touch a file called "master" you will see this output:

$ git diff HEAD master
fatal: ambiguous argument 'master': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

The solution is to use the double-dash to separate paths from revisions, as git suggests in its error message.

Related-to: #4944 (closed)

Signed-off-by: David Aguilar davvid@gmail.com

Merge request reports

Loading