We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5150728 commit 2218808Copy full SHA for 2218808
.gitattributes
@@ -34,3 +34,7 @@ third_party/** linguist-vendored
34
*.a binary
35
*.jar binary
36
*.tlo binary
37
+
38
+*.h merge=clang-format-driver
39
+*.cpp merge=clang-format-driver
40
+*.hpp merge=clang-format-driver
assembly/clang-format-driver
@@ -0,0 +1,21 @@
1
+#!/usr/bin/env bash
2
3
+set -eo pipefail
4
5
+BASE="$1"
6
+OURS="$2"
7
+THEIRS="$3"
8
+FILE="$4"
9
10
+TMP=$(mktemp)
11
+TMP_BASE=$(mktemp)
12
13
+cp "$THEIRS" "$TMP"
14
+cp "$BASE" "$TMP_BASE"
15
+clang-format -i --assume-filename="$FILE" --style=file:.clang-format "$TMP"
16
+clang-format -i --assume-filename="$FILE" --style=file:.clang-format "$TMP_BASE"
17
18
+git merge-file "$OURS" "$TMP_BASE" "$TMP"
19
20
+rm "$TMP"
21
+rm "$TMP_BASE"
0 commit comments