Conversation
check_no_dirty_state now filters out gitlink deltas (mode 0o160000) instead of relying on DiffOptions::ignore_submodules, which only works for entries declared in .gitmodules. This matches git-rebase behaviour: a staged or unstaged submodule pointer update no longer blocks drop, move, and squash. Add a stage_gitlink test helper in tests/common.rs and one new test per operation (drop_commit_allowed_with_staged_submodule, move_commit_allowed_with_staged_submodule, squash_commits_allowed_with_staged_submodule, squash_try_combine_allowed_with_staged_submodule) to verify the relaxed guard, alongside the existing tests that confirm ordinary staged/unstaged file changes are still rejected.
Enable rename detection via find_similar() in commit_diff_for_fragmap so git2 produces a single delta with old_path ≠ new_path instead of separate delete+add pairs. Build a rename map that traces each path back to its canonical (earliest) name and use it throughout the fragmap pipeline: extract_spans_propagated, build_fragmap, assign_hunk_groups, build_matrix, determine_touch_kind, and dump_per_file_spg_stats. Extract shared collect_file_commits() helper to replace four duplicated inline file-grouping loops.
Make <BASE> optional on the command line. When omitted, resolve refs/remotes/origin/HEAD symbolically to find the remote's default branch (e.g. origin/main) and pass it to find_reference_point. Falls back to 'main' when origin/HEAD is not configured. - Add GitRepo::default_branch() to the trait - Implement it in Git2Repo via refs/remotes/origin/HEAD - Make Cli::base Option<String> with updated help text - Add three tests in tests/reference_point.rs covering set/absent/non-main - Add default_branch stub to TUI test mock impls
9e2d9b0 to
f9ab6c8
Compare
…(T131) T133 was diagnosed as fixed by the T132 fix: libgit2's checkout_head(force) already resets both the index and workdir to HEAD, including removing files written to the workdir during conflict checkout that are absent from HEAD's tree. The dirty-workdir symptom was a consequence of stage_file leaving the index in a corrupt partial state, which T132 resolved. Add squash_abort_leaves_clean_working_tree to confirm that after aborting a conflicted squash, no staged changes, unstaged changes, or untracked files remain — even when the source commit introduced a new file (b.txt) that was written to the workdir by the conflict checkout but is absent from the original HEAD.
…plement-task prompt
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.
No description provided.