Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1312)

Issue 44263004: Fix "git cl format" when newer clang-format version is installed. (Closed)

Created:
7 years, 1 month ago by digit1
Modified:
7 years, 1 month ago
Reviewers:
M-A Ruel
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Visibility:
Public.

Description

Fix "git cl format" when newer clang-format version is installed. Newer versions of clang-format-diff.py now require a -i flag to explicitely apply edits, otherwise they just print a diff, which make "git cl format" a no-op. This patch fixes the issue by probing the script's help text to see if the flag is needed. If it is, it is added automatically. BUG=NONE R=maruel@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=231020

Patch Set 1 #

Total comments: 2

Patch Set 2 : Simplify #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -0 lines) Patch
M git_cl.py View 1 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
digit1
7 years, 1 month ago (2013-10-25 15:15:37 UTC) #1
M-A Ruel
https://codereview.chromium.org/44263004/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/44263004/diff/1/git_cl.py#newcode2275 git_cl.py:2275: help_line1 = help_text.split('\n')[0] if '[-i]' in help_text: cmd.append('-i') assume ...
7 years, 1 month ago (2013-10-25 15:19:09 UTC) #2
digit1
https://chromiumcodereview.appspot.com/44263004/diff/1/git_cl.py File git_cl.py (right): https://chromiumcodereview.appspot.com/44263004/diff/1/git_cl.py#newcode2275 git_cl.py:2275: help_line1 = help_text.split('\n')[0] Excellent suggestion thanks. I used the ...
7 years, 1 month ago (2013-10-25 15:25:20 UTC) #3
M-A Ruel
lgtm
7 years, 1 month ago (2013-10-25 15:26:05 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/digit@chromium.org/44263004/60001
7 years, 1 month ago (2013-10-25 15:34:43 UTC) #5
commit-bot: I haz the power
7 years, 1 month ago (2013-10-25 15:36:33 UTC) #6
Message was sent while issue was closed.
Change committed as 231020

Powered by Google App Engine
This is Rietveld 408576698