Fourth commit with separate chaining file
This commit is contained in:
parent
4a6f5ed0c1
commit
46aded7b95
2 changed files with 8 additions and 7 deletions
|
|
@ -102,13 +102,13 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Append previous commit hash to the proof file for chaining
|
||||
if [ -f "$OUTPUT_FILE" ]; then
|
||||
PREV_COMMIT=$(git rev-parse HEAD^1 2>/dev/null || echo "")
|
||||
if [ -n "$PREV_COMMIT" ]; then
|
||||
echo "" >> "$OUTPUT_FILE"
|
||||
echo "# Previous commit: $PREV_COMMIT" >> "$OUTPUT_FILE"
|
||||
fi
|
||||
# Get previous commit hash for chaining (before appending to proof file)
|
||||
PREV_COMMIT=$(git rev-parse HEAD^1 2>/dev/null || echo "")
|
||||
|
||||
# Store previous commit hash in a separate metadata file for chaining
|
||||
if [ -n "$PREV_COMMIT" ]; then
|
||||
echo "$PREV_COMMIT" > "$(dirname "$OUTPUT_FILE")/prev-commit.txt"
|
||||
echo "Chaining info saved: $PREV_COMMIT"
|
||||
fi
|
||||
|
||||
echo "Proof generated for commit: $COMMIT_HASH"
|
||||
|
|
|
|||
1
test3.txt
Normal file
1
test3.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test chaining
|
||||
Loading…
Add table
Add a link
Reference in a new issue