Skip to content

Commit a4a7bff

Browse files
committed
doc: rationale for steps in shell script
1 parent 20a9b6c commit a4a7bff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

libevm/tooling/merge/resolve.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,20 @@ set -eux;
2121

2222
cd "$(git rev-parse --show-toplevel)";
2323

24+
# Files for which we are taking full control have any incoming changes
25+
# discarded.
2426
OVERWRITING=(".github/workflows/go.yml" ".golangci.yml")
2527
git checkout --ours -- "${OVERWRITING[@]}";
2628
git add "${OVERWRITING[@]}";
2729

30+
# Files deleted by geth are deleted locally too because they're guaranteed to
31+
# not be our code due to the libevm naming convention.
2832
git status | grep "deleted by them" | awk '{print $NF}' | xargs -r git rm || echo "No files deleted upstream";
2933

34+
# There are a number of conflicts due to the module renaming, which can be
35+
# resolved mechanically by accepting the incoming changes. This is a blunt
36+
# first-pass approach, accepting entire files. It will start an interactive
37+
# terminal UI with instructions.
3038
cd ./libevm/tooling/merge;
3139
ACCEPTING=$(git status | grep "both modified" | awk '{print $NF}' | grep -P "\.go$" | go run . resolve theirs);
3240
if [[ -n "${ACCEPTING[*]// }" ]]; then # $x// removes whitespace

0 commit comments

Comments
 (0)