r182923 - Fix default value of clang-format-diff's -p option.
Daniel Jasper
djasper at google.com
Thu May 30 04:50:20 PDT 2013
Author: djasper
Date: Thu May 30 06:50:20 2013
New Revision: 182923
URL: http://llvm.org/viewvc/llvm-project?rev=182923&view=rev
Log:
Fix default value of clang-format-diff's -p option.
This way, it has the same default as 'patch' and also the example in the
code makes more sense as it is explicitly setting -p 1.
Modified:
cfe/trunk/tools/clang-format/clang-format-diff.py
Modified: cfe/trunk/tools/clang-format/clang-format-diff.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py?rev=182923&r1=182922&r2=182923&view=diff
==============================================================================
--- cfe/trunk/tools/clang-format/clang-format-diff.py (original)
+++ cfe/trunk/tools/clang-format/clang-format-diff.py Thu May 30 06:50:20 2013
@@ -83,7 +83,7 @@ def formatRange(r, style):
def main():
parser = argparse.ArgumentParser(description=
'Reformat changed lines in diff')
- parser.add_argument('-p', default=1,
+ parser.add_argument('-p', default=0,
help='strip the smallest prefix containing P slashes')
parser.add_argument('-style',
help='formatting style to apply (LLVM, Google, Chromium)')
More information about the cfe-commits
mailing list