You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
The file path/to/unmodified-file is (unsurprisingly) already committed to the repo and unmodified (both in staging and worktree). In this case, I would expect that fileStatus.Worktree == git.Unmodified. However, the following happens:
I'm unsure if this behaviour is intentional and I've just misunderstood how Status is supposed to work (in which case I might suggest at least clearing up the docs a little bit) or if this is an actual bug. 🤷♂
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm using (more like, trying to use) this library to determine if certain files in a Git repository have been modified or not.
This was my approach (error handling omitted for brevity):
The file
path/to/unmodified-file
is (unsurprisingly) already committed to the repo and unmodified (both in staging and worktree). In this case, I would expect thatfileStatus.Worktree == git.Unmodified
. However, the following happens:This seems to occur because
Untracked
is kind of the "default" status:go-git/status.go
Lines 15 to 21 in 1a7db85
I'm unsure if this behaviour is intentional and I've just misunderstood how
Status
is supposed to work (in which case I might suggest at least clearing up the docs a little bit) or if this is an actual bug. 🤷♂The text was updated successfully, but these errors were encountered: