-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
ghasum update
preserve existing checksums
Update the implementation of the `ghasum update` command to preserve existing sums even if they're invalid. Here, "existing sums" refers to entries in the sumfile for which the whole ID matches before and after the update. This helps avoid a scenario where an update silently hides that an existing dependent action actually changed while it should not have. The specification text has been updated accordingly. The implementation for this is straightforward, but naive and arguably unnecessarily inefficient. Rather than not computing the checksums, the approach taken overrides the old values into the list of new checksums. The motivation for this is primarily simplicity and this choice may be revisited with a full refactor to reduce unnecessary use of resources now-used to compute checksums that end up discarded. A note on the discarded error from the `decode` call: if an error would occur it already occurs in the call to `version`, hence we don't handle it twice.
- Loading branch information
1 parent
4f1fdb2
commit a3b2e42
Showing
3 changed files
with
92 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters