Use `git rev-list A..B` to get the list of commits to be uploaded to Gerrit by git cl.
BUG=374121
Review URL: https://codereview.chromium.org/284113005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270972 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index 06594f0..e8695e8 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1498,11 +1498,11 @@
if CHANGE_ID not in change_desc.description:
AddChangeIdToCommitMessage(options, args)
- commits = RunGit(['rev-list', '%s/%s...' % (remote, branch)]).splitlines()
+ commits = RunGit(['rev-list', '%s/%s..' % (remote, branch)]).splitlines()
if len(commits) > 1:
print('WARNING: This will upload %d commits. Run the following command '
'to see which commits will be uploaded: ' % len(commits))
- print('git log %s/%s...' % (remote, branch))
+ print('git log %s/%s..' % (remote, branch))
print('You can also use `git squash-branch` to squash these into a single'
'commit.')
ask_for_data('About to upload; enter to confirm.')