Fourth commit with separate chaining file

This commit is contained in:
Otto 2026-03-07 16:19:40 +01:00
parent 4a6f5ed0c1
commit 46aded7b95
2 changed files with 8 additions and 7 deletions

View file

@ -102,13 +102,13 @@ else
exit 1 exit 1
fi fi
# Append previous commit hash to the proof file for chaining # Get previous commit hash for chaining (before appending to proof file)
if [ -f "$OUTPUT_FILE" ]; then PREV_COMMIT=$(git rev-parse HEAD^1 2>/dev/null || echo "")
PREV_COMMIT=$(git rev-parse HEAD^1 2>/dev/null || echo "")
if [ -n "$PREV_COMMIT" ]; then # Store previous commit hash in a separate metadata file for chaining
echo "" >> "$OUTPUT_FILE" if [ -n "$PREV_COMMIT" ]; then
echo "# Previous commit: $PREV_COMMIT" >> "$OUTPUT_FILE" echo "$PREV_COMMIT" > "$(dirname "$OUTPUT_FILE")/prev-commit.txt"
fi echo "Chaining info saved: $PREV_COMMIT"
fi fi
echo "Proof generated for commit: $COMMIT_HASH" echo "Proof generated for commit: $COMMIT_HASH"

1
test3.txt Normal file
View file

@ -0,0 +1 @@
# Test chaining