format-and-absorb: fix merge base
Jörg Thalheim committed
Jun 13, 2025 at 11:27 UTC
cfc7f2737e0e53d9bf9ec6e504f47bef643b0831
1 file changed
+3
-1
.github/scripts/format-and-absorb.sh
+3
-1
@@ -20,7 +20,9 @@ echo "::group::Running git absorb"
20
# Run git absorb with --force to automatically absorb changes
21
git add -A
22
# Create fixup commits
23
-git absorb --force --base origin/main
23
+# Find the merge base to properly identify which commits can absorb changes
24
+MERGE_BASE=$(git merge-base origin/main HEAD)
25
+git absorb --force --base "$MERGE_BASE"
26
# Then do a non-interactive autosquash rebase with git identity set
27
export GIT_EDITOR=:
28
export GIT_SEQUENCE_EDITOR=: