We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assume the following code on a workdir with an untracked file with at least one line of content:
git_diff_options opts = GIT_DIFF_OPTIONS_INIT; git_diff *diff = NULL; opts.flags |= GIT_DIFF_INCLUDE_UNTRACKED | GIT_DIFF_SHOW_UNTRACKED_CONTENT | GIT_DIFF_REVERSE; git_diff_index_to_workdir(&diff, repo, NULL, &opts)
This diff will not properly load the content when inspected. Specifically, the following call will never get run diff_hunk_cb or diff_line_cb:
diff_hunk_cb
diff_line_cb
git_diff_foreach(diff, diff_file_cb, diff_binary_cb, diff_hunk_cb, diff_line_cb, &exp)
The call above should call diff_hunk_cb once and diff_line_cb for each content line.
The calls never happen because, internally, the content is never loaded.
2f20fe8869d7a1df7c9b7a9e2939c1a20533c6dc
macOS
The text was updated successfully, but these errors were encountered:
libgit2#6576 git_diff_index_to_workdir reverse now loads untracked co…
4a2c4cc
…ntent
Merge pull request #6577 from cavaquinho/fix/workdir_to_index_untrack…
e3e0564
…ed_reverse #6576 git_diff_index_to_workdir reverse now loads untracked content
No branches or pull requests
Reproduction steps
Assume the following code on a workdir with an untracked file with at least one line of content:
This diff will not properly load the content when inspected. Specifically, the following call will never get run
diff_hunk_cb
ordiff_line_cb
:Expected behavior
The call above should call
diff_hunk_cb
once anddiff_line_cb
for each content line.Actual behavior
The calls never happen because, internally, the content is never loaded.
Version of libgit2 (release number or SHA1)
2f20fe8869d7a1df7c9b7a9e2939c1a20533c6dc
Operating system(s) tested
macOS
The text was updated successfully, but these errors were encountered: