summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2017-06-28 10:43:06 +0200
committerJulian Andres Klode <jak@debian.org>2017-06-28 15:52:38 +0200
commit3cb78eef6fd8dcfa964c4ebb83db71efc8cabd64 (patch)
tree197017ad66aca4cbdf7e097014d194b402a26fa3
parentfc251c8c9e2a76ab5c350900e9e032830c81e2b3 (diff)
downloadapt-3cb78eef6fd8dcfa964c4ebb83db71efc8cabd64.tar.gz
Add clang-format definitions
Also add git-clang-format helper to help with }}} Gbp-Dch: ignore
-rw-r--r--.clang-format9
-rwxr-xr-xgit-clang-format.sh2
2 files changed, 11 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 000000000..00edbfc92
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,9 @@
+Language: Cpp
+# BasedOnStyle
+
+TabWidth: 8
+UseTab: Always
+IndentWidth: 3
+ColumnLimit: 0
+BreakBeforeBraces: Allman
+AccessModifierOffset: 0
diff --git a/git-clang-format.sh b/git-clang-format.sh
new file mode 100755
index 000000000..7cbb5ccd7
--- /dev/null
+++ b/git-clang-format.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+git clang-format-3.8 --diff "$@" | sed "s#+/\*\}\}\}\*/#+ /*}}}*/#" | patch -p1