gogitstatus is a library for finding unstaged/untracked files in local Git repositories
Tested for Linux, FreeBSD and Windows
This library is used in my terminal file manager fen
To try out gogitstatus.Status(), run the showstatus program:
cd showstatus
go build
./showstatus . # In any git repositoryTo try out gogitstatus.ParseIndex(), run the showindex program:
cd showindex
go build
./showindex indexRun go test -race to run all the tests.
Run go test -fuzz=FuzzParseGitIndexFromMemory to fuzz for crashes in the ParseGitIndexFromMemory() function.
If you are developing on Linux, you can run the ./run_windows_test.sh script to test on "Windows" with wine
https://git-scm.com/docs/index-format (missing some visual separation...)
https://github.com/git/git/blob/master/read-cache.c
- Deal with .git files that point the real .git folder elsewhere (submodules or something)
- Support exclude file priority
- Support SHA-256
- Support other Git Index versions besides 2