Skip to content

fix: ignore duplicate topo traversal tips - #2903

Merged
Sebastian Thiel (Byron) merged 2 commits into
mainfrom
traverse-dupl-tip
Aug 11, 2026
Merged

fix: ignore duplicate topo traversal tips#2903
Sebastian Thiel (Byron) merged 2 commits into
mainfrom
traverse-dupl-tip

Conversation

@Byron

@Byron Sebastian Thiel (Byron) commented Aug 11, 2026

Copy link
Copy Markdown
Member

Tasks

This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.

  • refackiew

Everything below this line was generated by Codex GPT-5.

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

Fixes #2902

Summary

  • ignore repeated topological traversal tips while preserving first-seen order
  • cover both topo and date ordering, with and without a commit graph

Git baseline: t/t6003-rev-list-topo-order.sh verifies that duplicated head arguments produce the same complete walk.

Validation

  • cargo test -p gix-traverse
  • cargo fmt --all -- --check
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3819446a56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread gix-traverse/src/commit/topo/init.rs Outdated
Comment thread gix-config/tests/config/file/mutable/value.rs Outdated
<!-- agent -->
Repeated starting commits were inserted into the topological queue more than
once, which could duplicate the tip and truncate walks depending on sorting.
The regression compares one tip with the same tip supplied twice for both
topological and date ordering, with and without a commit graph.

Ignore repeated tips at the builder boundary while preserving their
first-seen order. This matches Git's duplicated-head behavior covered by
t/t6003-rev-list-topo-order.sh.

Assisted-by: GPT 5.6
Co-authored-by: GPT 5.6 <codex@openai.com>
<!-- agent -->
Replacing a continued value that ended at a comment on the next physical line
removed the continuation newline, turning the standalone comment into an inline
comment on the replacement value.

Retain the final continuation newline when an empty ValueDone event is followed
by a comment. Cover hash and semicolon comments with LF and CRLF, along with
quoted comment markers that remain value content. This matches git config
parsing behavior.

Assisted-by: GPT 5.6
Co-authored-by: GPT 5.6 <codex@openai.com>
@Byron
Sebastian Thiel (Byron) merged commit 70e98a0 into main Aug 11, 2026
32 checks passed
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.

gix::traverse::commit::topo walk is truncated with identical tips

2 participants