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
experimental/szager/collated-output
bauerb@chromium.org 15 years ago
parent d8da2c1053
commit 838f0f28a5

@ -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

Loading…
Cancel
Save