Skip to content

Leading whitespace in .git/info/exclude leaves .rift visible #29

Description

@gpu004

What I observed

If .git/info/exclude contains /.rift, rift init treats the marker rule as present even though Git does not ignore .rift.

Reproduction

cargo build --locked
probe=$(mktemp -d /tmp/rift-gitignore-space.XXXXXX)
mkdir -p "$probe/source"
git -C "$probe/source" init
printf ' /.rift\n' > "$probe/source/.git/info/exclude"

target/debug/rift --database "$probe/registry.sqlite" init --here "$probe/source"
git -C "$probe/source" check-ignore --quiet .rift; echo "check-ignore: $?"
git -C "$probe/source" status --short
cat "$probe/source/.git/info/exclude"

init succeeds and leaves info/exclude unchanged. git check-ignore exits 1, and git status --short reports:

?? .rift

The Hegel property minimized the failing prefix to one leading space.

Expected

After rift init, Git ignores .rift.

Actual

Rift accepts a line that Git does not interpret as the /.rift ignore rule, leaving the marker untracked.

Environment

  • Rift commit 757a22cb247f
  • macOS 26.6.2, arm64, APFS

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions