File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ ** /* merge =pr826
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # See https://github.com/ldionne/llvm-project/blob/main/libcxx/utils/clang-format-merge-driver.sh
4
+ # Install via (from repo root):
5
+ # git config merge.pr826.name "Fix type alias names for https://github.com/llvm/clangir/pull/826"
6
+ # git config merge.pr826.driver "clang/test/CIR/pr826-merge-driver.sh %O %A %B %P"
7
+
8
+ # Path to the file's contents at the ancestor's version.
9
+ base=" $1 "
10
+
11
+ # Path to the file's contents at the current version.
12
+ current=" $2 "
13
+
14
+ # Path to the file's contents at the other branch's version (for nonlinear histories, there might be multiple other branches).
15
+ other=" $3 "
16
+
17
+ # The path of the file in the repository.
18
+ path=" $4 "
19
+
20
+ sed -E -e ' s/ty_22([A-Za-z0-9_$]+[0-9])22/ty_\1_/g' -e ' s/ty_22([A-Za-z0-9_$]+)22/ty_\1/g' < " $base " > " $base .tmp"
21
+ mv " $base .tmp" " $base "
22
+
23
+ sed -E -e ' s/ty_22([A-Za-z0-9_$]+[0-9])22/ty_\1_/g' -e ' s/ty_22([A-Za-z0-9_$]+)22/ty_\1/g' < " $current " > " $current .tmp"
24
+ mv " $current .tmp" " $current "
25
+
26
+ sed -E -e ' s/ty_22([A-Za-z0-9_$]+[0-9])22/ty_\1_/g' -e ' s/ty_22([A-Za-z0-9_$]+)22/ty_\1/g' < " $other " > " $other .tmp"
27
+ mv " $other .tmp" " $other "
28
+
29
+ git merge-file -Lcurrent -Lbase -Lother " $current " " $base " " $other "
You can’t perform that action at this time.
0 commit comments