Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Status.IsClean() seems reversed #838

Closed
@mickael-carl

Description

@mickael-carl

Looking at the Status.IsClean() function, the documentation states the following:

IsClean returns true if all the files aren't in Unmodified status.

But shouldn't it be the opposite ? Namely, the worktree status is clean, if all files are unmodified, and not clean if any file has a modification, or an untracked file is present, or a file has been deleted. See for instance the output of git status:

  • with a worktree containing no modifications:

On branch master
nothing to commit, working tree clean

  • with a worktree containing modifications:

On branch master
Changes to be committed:
(use "git reset HEAD ..." to unstage)
new file: foo

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