Skip to content

Describe --dirty marks dirty when it's not. #47

@fredcooke

Description

@fredcooke

Found in 2.1.0-2.1.2

If a file is tracked, and changed, but not committed, the repo is considered dirty.
If a file is not tracked it is simply not tracked and not part of the repo at all.

Starting with a pristine git directory with the following (dangerous) commands:

git reset --hard TAG
git clean -dfx

git describe --dirty=-DEV

should return TAG

touch afile

should still return TAG because afile is not tracked, just extra.

echo "png" >> .gitignore # assuming we had that tracked

should now return TAG-DEV because .gitignore has now been modified and not committed.

Just in case it matters: I noticed this due to a new package with some source files inside it. IE an untracked directory within a tracked directory. (yes I know git doesn't care about dirs)

I hope that helps :-)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions