combo-layer: handle ambiguous git arguments

If a branch/src-repository has the same name as a file/directory, git
since 1.4.0(?) gives an error like the one below:
ambiguous argument 'bitbake': both revision and filename
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Add two dashes to make the intent clear.

(From OE-Core rev: a84ec3ac15a59f72fcb46d97942009c8e459b5d0)

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Olaf Mandel 2016-10-17 08:16:28 +00:00 committed by Richard Purdie
parent 050b8969ab
commit e02f0f1cb1
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ file_exclude = %s''' % (name, file_filter or '<empty>', repo.get('file_exclude',
merge.append(name)
# Root all commits which have no parent in the common
# ancestor in the new repository.
for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s' % name).split('\n'):
for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s --' % name).split('\n'):
runcmd('git replace --graft %s %s' % (start, startrev))
try:
runcmd(merge)