Repository navigation
feat: add an index_head knob for the heading a fresh index gets - #17
Merged
Merged
Conversation
A tree that does not commit its generated index (its entry titles are private) recreates the index from scratch in every clone. rebuild-index then writes the generic "# Index" heading, silently replacing the tree's own heading and do-not-hand-edit guidance on that first rebuild. index_head (default None, keeping "# Index") is the text written above the generated marker when the index does not exist yet. An existing index keeps whatever head it carries, and a marker-less index holding a yaml pinning fence under the configured head keeps the fence, as it already did under the generic one. Non-string values fail at configure().
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.
Summary
Some installs don't commit their generated index, for example when entry titles are private. They recreate it from scratch in every clone, and the first
rebuild-indexthen writes the generic# Indexheading, silently replacing the tree's own heading and its do-not-hand-edit guidance.New extension knob
index_head(defaultNone, which keeps# Index): the text written above the generated marker when the index file does not exist yet.index_headonly seeds a missing one.ConfigErroratconfigure().This upstreams a patch a downstream install was carrying locally on its vendored copy, so a plain re-copy of
wikilint/no longer drops the feature.Test plan
tests/test_index_head.py(fresh head, default unchanged, stable rebuild with no drift, existing head wins, pinning fence preserved, type validation); 3 red before implementation