Re: Refresh index without discard_index + repo_read_index

2019-03-11 Thread Roman Perepelitsa
In the end I managed to patch diffing code in libgit2 (git_diff_tree_to_index and git_diff_index_to_workdir) to make it about 4x faster. It's now faster than `git status`, so good enough for me. I'm still curious whether it's possible to refresh index in git (not libgit2), so please chime if if yo

Refresh index without discard_index + repo_read_index

2019-03-09 Thread Roman Perepelitsa
I’m writing a program that reads stdin in a loop and prints the equivalent of `git status` whenever it reads a character. It always prints its results for the same repository, the same pathspec, etc. The input characters have no effect on the output, only the sate of the repository does. I’m hoping