Skip to content

Gitbase-Picker Feature with Trust-Aware Diff Base - #15938

Draft
Dronakurl wants to merge 3 commits into
helix-editor:masterfrom
Dronakurl:gitbase-picker
Draft

Dronakurl wants to merge 3 commits into
helix-editor:masterfrom
Dronakurl:gitbase-picker

Conversation

@Dronakurl

Copy link
Copy Markdown

This PR introduces the gitbase-picker feature, allowing users to set a custom diff base (e.g., :set-diff-base master) for git operations in the current worktree. The implementation includes a trust-aware diff base system that properly handles workspace trust settings, ensuring secure file access while maintaining full functionality. The feature integrates with the existing git picker (space-g) to display changes relative to the selected base.

This PR was prepared with the use of an AI companion

@Dronakurl
Dronakurl force-pushed the gitbase-picker branch 8 times, most recently from 3a0e65b to 223cb6c Compare July 3, 2026 19:42
Dronakurl and others added 3 commits October 10, 2026 19:55
Includes:
- Configurable git diff base
- DiffBase status line element
- Proper diff base passing to file picker
- set-diff-base and reset-diff-base commands
- Fixes for gitbase-picker functionality

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>

remove unnecessary check

formatting
- Use native gix tree diff in status_with_base instead of git CLI
  - Enables rename/copy detection with configurable rewrites
  - Combines committed changes (base->HEAD) with unstaged changes
  - More robust error handling and path handling
- Add helper functions:
  - get_file_at_commit: Get file content at any commit
  - tree_change_to_file_change: Convert tree diff to FileChange
  - picker_tracks_entry_kind: Filter tracked entry types
- Add shared diff_base_target_path helper in typed.rs
- Update documentation in lib.rs
- Update test.rs with better test infrastructure

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>

This branch has not been deployed

No deployments
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.

1 participant