Commit 06928534 authored by wychen@chromium.org's avatar wychen@chromium.org

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
parent 69bf3adc
......@@ -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])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment