From 2714ba03f6da42f7e0d56353ea7cebf6225f9f15 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Thu, 30 May 2013 11:50:20 +0000 Subject: [PATCH] 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. llvm-svn: 182923 --- clang/tools/clang-format/clang-format-diff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/tools/clang-format/clang-format-diff.py b/clang/tools/clang-format/clang-format-diff.py index 68b5113d92f6..bb18730b63c6 100755 --- a/clang/tools/clang-format/clang-format-diff.py +++ b/clang/tools/clang-format/clang-format-diff.py @@ -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)')