Closed swordow closed 2 years ago
Sorry for the logic bug... :-(
What was your logic bug? I'm trying to implement something similar; your code is helpful.
What was your logic bug? I'm trying to implement something similar; your code is helpful.
The code works fine. The previous version which was wrong is that i counted the delta num incorrectly. PS: If the modification was staged, the deltas().len() returns 0 for the api compareding the index and workdir.
I have a problem that using "git diff" in repo outputs the patch, but using git2rs's diff_index_to_workdir api does not ouput anything. Any one had this problem before? The following is the test code: