Skip to content

Staleness polling and untracked files disabled for bare ref mode (--base <sha>) #10

Description

@belskikh

When running diffity --base (single ref, no range), two features are silently disabled:

  1. Staleness auto-refresh — getRefCapabilities() in packages/git/src/repo.ts only enables staleness for working-tree refs (work, ., staged, unstaged) and range refs (containing ..). A bare SHA/branch ref returns staleness: false, so the 3-second fingerprint poll never starts. The UI won't detect file changes until a manual browser refresh.
  2. Untracked files — resolveDiffArgs() in packages/git/src/diff.ts sets includeUntracked: false for the default (bare ref) case. New files don't appear in the diff until git add.

This matters for worktree-based workflows where you run diffity --base to see the full branch diff (committed + uncommitted). Without these, the diff viewer appears broken — it doesn't refresh and misses new files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions