Commit 13502e0f authored by bauerb@chromium.org's avatar bauerb@chromium.org

Use %B format instead of %s\n\n%b to get the raw commit message from a hash.

\n doesn't work on Windows, and %B is shorter anyway.

BUG=586344

Review URL: https://codereview.chromium.org/1705193003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298845 0039d316-1c4b-4281-b951-d872f2087c98
parent cd9a3389
......@@ -2021,7 +2021,7 @@ def GerritUpload(options, args, cl, change):
if options.squash:
# Try to get the message from a previous upload.
shadow_branch = 'refs/heads/git_cl_uploads/' + cl.GetBranch()
message = RunGitSilent(['show', '--format=%s\n\n%b', '-s', shadow_branch])
message = RunGitSilent(['show', '--format=%B', '-s', shadow_branch])
if not message:
if not options.force:
change_desc.prompt()
......
......@@ -602,7 +602,7 @@ class TestGitCl(TestCase):
if squash:
ref_to_push = 'abcdef0123456789'
calls += [
((['git', 'show', '--format=%s\n\n%b', '-s',
((['git', 'show', '--format=%B', '-s',
'refs/heads/git_cl_uploads/master'],),
(description, 0)),
((['git', 'config', 'branch.master.merge'],),
......
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