summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/buildman/func_test.py2
-rw-r--r--tools/patman/gitutil.py5
2 files changed, 7 insertions, 0 deletions
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index 75eb3a9..a0bd46c 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -255,6 +255,8 @@ class TestFunctional(unittest.TestCase):
self.assertEqual(gitutil.use_no_decorate, True)
def _HandleCommandGitLog(self, args):
+ if args[-1] == '--':
+ args = args[:-1]
if '-n0' in args:
return command.CommandResult(return_code=0)
elif args[-1] == 'upstream/master..%s' % self._test_branch:
diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py
index 5f1b4f6..e088bae 100644
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -44,6 +44,11 @@ def LogCmd(commit_range, git_dir=None, oneline=False, reverse=False,
cmd.append('-n%d' % count)
if commit_range:
cmd.append(commit_range)
+
+ # Add this in case we have a branch with the same name as a directory.
+ # This avoids messages like this, for example:
+ # fatal: ambiguous argument 'test': both revision and filename
+ cmd.append('--')
return cmd
def CountCommitsToBranch():