]> granicus.if.org Git - clang/commitdiff
Fix default value of clang-format-diff's -p option.
authorDaniel Jasper <djasper@google.com>
Thu, 30 May 2013 11:50:20 +0000 (11:50 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 30 May 2013 11:50:20 +0000 (11:50 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182923 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-format/clang-format-diff.py

index 68b5113d92f6e03773cae8f5e35510a257dcc2b0..bb18730b63c6847247937938c199549bfc44839a 100755 (executable)
@@ -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)')