Skip to content

Remove checksum entirely when excising with -x -c - #102

Open
ekanshul wants to merge 1 commit into
nedbat:mainfrom
ekanshul:fix-94-excise-checksum
Open

ekanshul wants to merge 1 commit into
nedbat:mainfrom
ekanshul:fix-94-excise-checksum

Conversation

@ekanshul

Copy link
Copy Markdown

Fixes #94

cog -x -c set new_hash to "" but still formatted the end marker with add_hash=True, which wrote (sum: ). A later cog -r -c then appended a second checksum:

//[[[end]]] (sum: m14VqCPTHP) (sum: )

When -x is on, treat the end marker like a no-hash rewrite so the checksum is removed. Regenerating with -r -c then writes a single new checksum.

Also adds a changelog note under Unreleased.

-x left new_hash empty but -c still formatted (sum: ), so a later
-r -c appended a second checksum.

Fixes nedbat#94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: cog -x -r -c leaves an empty (sum: ) checksum

1 participant