Repository navigation
fix: the changelog's commit hashes are always seven characters, so --check agrees on every machine - #160
Open
lnorton89 wants to merge 1 commit into
Open
fix: the changelog's commit hashes are always seven characters, so --check agrees on every machine#160lnorton89 wants to merge 1 commit into
lnorton89 wants to merge 1 commit into
Conversation
…check agrees on every machine git's %h lengthens an abbreviation until it is unique among the objects a clone holds, so the same commit got 7 characters on one machine and 8 on another (f463b3e in 0.5.1), and --check failed wherever the clone differed from the one that wrote the file. The changelog now takes the first seven characters of the full hash; links still use the full hash. CHANGELOG.md is rebuilt under that rule.
Contributor
|
Claude finished @lnorton89's task in 11s —— View job Review of PR #160No issues found. |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cargo xtask changelog --checkfailed on LIGHTNING's checkouts while passing on CI.Cause: the changelog took short hashes from git's
%h, and git lengthens an abbreviation until it is unique among the objects that clone holds. The same commit therefore got 7 characters on one machine and 8 on another. 0.5.1 already has one 8-character entry,f463b3e2. On a clone with more objects, every released entry differed.Fix:
short_hashtakes the first seven characters of the full hash. Links still use the full hash. CHANGELOG.md is rebuilt under the new rule, which changes that one released entry and fills Unreleased;--checkignores Unreleased.Checked:
cargo xtask ci fmt generated conventionspasses on LIGHTNING, along with xtask's clippy and tests. New test:the_short_hash_is_seven_characters_whatever_git_would_choose.