Skip to content

Previously ignored files should not become tracked on checkout #5596

@martinvonz

Description

@martinvonz

Description

When updating from a commit where some files are ignored to a commit where they are not ignored (typically an older version), the ignored files will be picked up by subsequent snapshotting. That's rarely what one wants, and it's especially problematic if the ignored files are many (e.g. target/ in Rust projects).

Steps to Reproduce the Problem

cd $(mktemp -d)
jj git init
jj new
echo ignored > .gitignore
touch ignored
jj edit @-
jj status

Actual Behavior

The ignored file is tracked.

Expected Behavior

The ignored file does not get tracked. Perhaps jj status reports that it's in some kind of intermediate state.

We could implement it by having the WorkingCopy keep track of this type of file. Files would enter this state when updating the working copy and the ignored paths change. They would exit it when they're either either deleted or properly ignored again.

This idea was originally suggested by @ony.

Specifications

  • Platform: All
  • Version: 0.25.0 (and probably all before it)

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