File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,21 +22,45 @@ FORK_OWNED_PATHS=(
2222 " CLAUDE.md"
2323)
2424
25+ # Upstream-owned files that may conflict because equivalent upstream commits were
26+ # previously imported into the fork with different commit ancestry. In these
27+ # cases we want the exact upstream version during sync.
28+ UPSTREAM_PREFERRED_PATHS=(
29+ " engine/src/main/java/com/arcadedb/utility/RidHashSet.java"
30+ )
31+
2532PROTECTED_SOURCE_REV=" "
2633
2734try_auto_resolve () {
28- local conflicts resolved
35+ local conflicts resolved path handled
2936 conflicts=$( git status --porcelain | awk ' $1 ~ /U/ {print $2}' )
3037 if [ -z " $conflicts " ]; then
3138 return 1
3239 fi
3340 resolved=0
3441 for path in $conflicts ; do
42+ handled=0
3543 for protected_path in " ${FORK_OWNED_PATHS[@]} " ; do
3644 if [[ " $path " == " $protected_path " ]]; then
3745 git checkout --ours -- " $path "
3846 git add " $path "
3947 resolved=1
48+ handled=1
49+ break
50+ fi
51+ done
52+
53+ if [ " $handled " -eq 1 ]; then
54+ continue
55+ fi
56+
57+ for upstream_path in " ${UPSTREAM_PREFERRED_PATHS[@]} " ; do
58+ if [[ " $path " == " $upstream_path " ]]; then
59+ echo -e " ${CYAN} ℹ️ Auto-resolving upstream-preferred conflict: $path ${NC} "
60+ git checkout --theirs -- " $path "
61+ git add " $path "
62+ resolved=1
63+ handled=1
4064 break
4165 fi
4266 done
You can’t perform that action at this time.
0 commit comments