Expand on ambiguous arguments in test description
Make the reason to test for ambiguous arguments clearer as well as better explain why creating a file with a name the same as a SHA1 that will be examined by the searcher code will check that the code is correctly delimiting between commit and path arguments. Change-Id: I43e07d282fc3db86a1753fdbbfa395cdcc12727e
This commit is contained in:
parent
d50f0a398a
commit
adc18a19db
|
@ -24,6 +24,25 @@
|
|||
that are being passed to git, in this case a SHA1 that should be excluded
|
||||
from the list of commits to process.
|
||||
|
||||
This is important where executing a git command using a reference (or
|
||||
shortened SHA1) that matches a filename in the current tree.
|
||||
|
||||
For example, if executing:
|
||||
|
||||
git rev-list 2cba7890ef
|
||||
|
||||
If a file exists with the name "2cba7890ef", the git command will throw
|
||||
an error about ambiguous arguments, because it cannot distinguish
|
||||
whether "2cba7890ef" refers to the file or the commit object. Therefore
|
||||
the following format is required to identify the commit:
|
||||
|
||||
git rev-list 2cba7890ef --
|
||||
|
||||
The '--' delimits that any following argument is a path, so git commands
|
||||
are able to parse that a preceding argument that is not an option must
|
||||
be a reference or git object identifier.
|
||||
|
||||
|
||||
Repository layout being tested
|
||||
|
||||
B---C---F---G master
|
||||
|
|
Loading…
Reference in New Issue