Skip to content

Enable precious gitignore syntax through gix#340

Merged
Byron merged 4 commits into
mainfrom
precious-support
Jun 21, 2026
Merged

Enable precious gitignore syntax through gix#340
Byron merged 4 commits into
mainfrom
precious-support

Conversation

@Byron

@Byron Byron commented Jun 21, 2026

Copy link
Copy Markdown
Owner

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.

Reported issue

Remove separate gix-glob and gix-path crates and refer to them through gix directly. Also, add a config-override when opening the Git repository to gitoxide.parsePrecious=true to support precious file syntax out of the box.

Summary

  • Removed direct gix-glob and gix-path dependencies and updated call sites to use gix::glob and gix::path re-exports.
  • Kept Git ignored-entry behavior behind the existing git feature while making gix the single crate dependency for the shared gix APIs.
  • Open repository discovery for gitignored-entry detection with gitoxide.parsePrecious=true for both full and reduced trust levels.
  • Added a regression case for $precious.tmp in the existing gitignored-entry journey.

Git baseline

The reference Git checkout at 7760f83b59750c27df653c5c46d0f80e44cfe02c has no parsePrecious or ignored-and-precious ignore syntax. This behavior is a gitoxide extension parsed by gix-ignore through the $ prefix.

Validation

  • cargo test --features git gitignored_entries_are_marked_with_dedicated_key
  • cargo fmt --check
  • cargo check --no-default-features
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test was also run; 49 of 51 main tests passed, with two local fixture graph-size assertions failing due filesystem allocation-size differences unrelated to this change.

Review

codex review --commit 39bdf69bdc4b42f6cbfe99a448da265837b3287f could not complete because the local Codex CLI reported a usage limit. It was not rerun for the same commit hash.

@Byron Byron force-pushed the precious-support branch from 39bdf69 to 7e1ee8a Compare June 21, 2026 09:28
@Byron Byron marked this pull request as ready for review June 21, 2026 09:28
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Byron Byron force-pushed the precious-support branch 2 times, most recently from b5bddad to 7f57754 Compare June 21, 2026 09:56
codex and others added 3 commits June 21, 2026 18:00
When opening the Git repository for ignored-entry
detection, add a config override gitoxide.parsePrecious=true so precious ignore
syntax works out of the box.

**Usage**

```gitignore
$preciousFile
preciousFile
disposable
```

Now `preciousFile` won't show up in `dua` for auto-marking,
only `disposable` will.

Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
For simpler code, and nobody needed that anyway. Can be re-introduced
if that changes.

Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
**`gitignore` Configuration Option**

A new config option, `gitignore`, now lets users control Git-ignored entry
detection in interactive mode. It is defined as an optional boolean in the
config (`Option<bool>`), and if left unset it defaults to enabled behavior (same
as previous behavior).

**Usage**

You can control it in your config file as follows:

```toml
gitignore = true

gitignore = false
```

**Motivation**

This makes Git-ignored behavior configurable without requiring feature flags or
build-time changes, while preserving existing behavior for users who do not set
the option.

Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
@Byron Byron force-pushed the precious-support branch from 7f57754 to 9b96b02 Compare June 21, 2026 10:01
Add `cleanup_heuristics` configuration option for interactive mode,
to allow turning it off mainly as it default to 'on'.

Co-authored-by: Sebastian Thiel <sebastian.thiel@icloud.com>
@Byron Byron merged commit 568eb05 into main Jun 21, 2026
2 checks passed
@Byron Byron deleted the precious-support branch June 21, 2026 10:32
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.

2 participants