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
Description
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
Labels
No labels