GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — Clarify detached HEAD access and isolate test branch state by Byron · Pull Request #2231 · gitpython-developers/GitPython Conversation
|
| File | Summary |
|---|---|
test/lib/helper.py |
Adjusts writable fixture branch setup; annotated-tag revisions need normalization to a commit. |
git/repo/base.py |
Clarifies detached active_branch behavior. |
git/refs/symbolic.py |
Documents reference semantics and improves diagnostics. |
doc/source/tutorial.rst |
Adds detached-HEAD usage guidance. |
test/lib/helper.py:165
create_head resolves a string with rev_parse, so an annotated tag resolves to a TagObject and Head rejects it as non-commit. The attached-HEAD branch above avoids this by calling rw_repo.commit(working_tree_ref), so detached-source fixtures regress for any annotated-tag working_tree_ref; normalize the revision to a commit before creating master. rw_repo.head.reference = rw_repo.create_head(
"master", working_tree_ref, force=True, logmsg="Create test branch"
)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.