From 06928534d99bd20242f422281397a2e3599f86ec Mon Sep 17 00:00:00 2001 From: "wychen@chromium.org" Date: Tue, 3 Feb 2015 02:11:29 +0000 Subject: [PATCH] Allow branch name to be the same as directory name for "git cl diff" Remove the ambiguity between revision and filename (or directory name) when using command "git cl diff". BUG=454032 Review URL: https://codereview.chromium.org/889093002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293914 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git_cl.py b/git_cl.py index 4edb6a0af..9e1471996 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2785,9 +2785,9 @@ def CMDdiff(parser, args): if rtn != 0: return rtn - # Switch back to starting brand and diff against the temporary + # Switch back to starting branch and diff against the temporary # branch containing the latest rietveld patch. - subprocess2.check_call(['git', 'diff', TMP_BRANCH, branch]) + subprocess2.check_call(['git', 'diff', TMP_BRANCH, branch, '--']) finally: RunGit(['checkout', '-q', branch]) RunGit(['branch', '-D', TMP_BRANCH])