Observer autosync: a failed fast-forward names git's reason and the dirty files the incoming commits also touch
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
8082576477
commit
2b3ce1c7e3
1 changed files with 5 additions and 2 deletions
|
|
@ -32,10 +32,13 @@ while :; do
|
|||
local_sha=$(git rev-parse HEAD); remote_sha=$(git rev-parse origin/master)
|
||||
if [ "$local_sha" != "$remote_sha" ]; then
|
||||
if [ -z "$(git status --porcelain -- $PATHS)" ] && git merge-base --is-ancestor HEAD origin/master; then
|
||||
if git merge -q --ff-only origin/master; then
|
||||
if git merge -q --ff-only origin/master 2>/tmp/igneum-devnet/autosync-ff.err; then
|
||||
echo "$(date -u +%FT%TZ) fast-forwarded to $(git rev-parse --short HEAD)"
|
||||
else
|
||||
echo "$(date -u +%FT%TZ) fast-forward failed (local $local_sha, origin $remote_sha)"
|
||||
# name what blocks it: files dirty here that the incoming commits also change (4 October 2026, 20:05: results
|
||||
# files edited in the shared checkout against a commit of the same files; the observer sat behind master)
|
||||
blocking=$(comm -12 <(git status --porcelain | awk '{print $2}' | sort) <(git diff --name-only HEAD origin/master | sort) | head -5 | tr '\n' ' ')
|
||||
echo "$(date -u +%FT%TZ) fast-forward failed (local ${local_sha:0:7}, origin ${remote_sha:0:7}): $(head -c 200 /tmp/igneum-devnet/autosync-ff.err | tr '\n' ' ') blocking: ${blocking:-none found}"
|
||||
fi
|
||||
else
|
||||
echo "$(date -u +%FT%TZ) not fast-forwardable or dirty in $PATHS (local $local_sha, origin $remote_sha); waiting"
|
||||
|
|
|
|||
Loading…
Reference in a new issue