Commit 838f0f28 authored by bauerb@chromium.org's avatar bauerb@chromium.org

Change |scm.GIT.GenerateDiff| and |scm.GIT.GetDifferentFiles| to ignore unmerged upstream changes.

Similar to r43313, this CL makes |git try| use the same patch that |git cl upload| uploads.

Review URL: http://codereview.chromium.org/1595018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@44097 0039d316-1c4b-4281-b951-d872f2087c98
parent d8da2c10
......@@ -236,7 +236,7 @@ class GIT(object):
files, usually in the prospect to apply the patch for a try job."""
if not branch:
branch = GIT.GetUpstream(cwd)
command = ['diff-tree', '-p', '--no-prefix', branch, branch_head]
command = ['diff', '-p', '--no-prefix', branch + "..." + branch_head]
if not full_move:
command.append('-C')
# TODO(maruel): --binary support.
......@@ -256,7 +256,7 @@ class GIT(object):
"""Returns the list of modified files between two branches."""
if not branch:
branch = GIT.GetUpstream(cwd)
command = ['diff', '--name-only', branch, branch_head]
command = ['diff', '--name-only', branch + "..." + branch_head]
return GIT.Capture(command, cwd)[0].splitlines(False)
@staticmethod
......
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