Skip to content

Commit 3e3a704

Browse files
asaezpercodebot
authored andcommitted
ci: release autofix both added
1 parent 2ce5fd4 commit 3e3a704

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.gitlab/ci/release/auto_merge.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,23 @@ fix_conflicts_using_theirs() {
6868
fi
6969

7070
done <<<"$lines"
71+
72+
conflict_name="both added:"
73+
conflict_size_next=${#conflict_name}+6
74+
lines=$(git status)
75+
while read -r line; do
76+
status=${line:0:${#conflict_name}}
77+
78+
if [[ "$status" == "$conflict_name" ]]; then
79+
path_name=${line:$conflict_size_next:${#line}}
80+
echo "Resolving using theirs $path_name"
81+
git diff ORIG_HEAD MERGE_HEAD "$path_name"
82+
git checkout --theirs "$path_name"
83+
git add "$path_name"
84+
fi
85+
86+
done <<<"$lines"
87+
7188
}
7289

7390
remove_lfs_files() {

0 commit comments

Comments
 (0)