pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/libgit2/pygit2/pull/1100

ssets/global-0bd78641c0a1f3e0.css" /> Fixes #962: First create a git_patch to get delta->flags correctly by yoichi · Pull Request #1100 · libgit2/pygit2 · GitHub
Skip to content

Fixes #962: First create a git_patch to get delta->flags correctly#1100

Open
yoichi wants to merge 1 commit intolibgit2:masterfrom
yoichi:delta-flags
Open

Fixes #962: First create a git_patch to get delta->flags correctly#1100
yoichi wants to merge 1 commit intolibgit2:masterfrom
yoichi:delta-flags

Conversation

@yoichi
Copy link
Copy Markdown

@yoichi yoichi commented Oct 23, 2021

diff_get_delta_byindex() may result incorrect value of delta->flags
as described in the comment of git_diff_get_delta() (git2/diff.h)

Note that the flags on the delta related to whether it has binary
content or not may not be set if there are no attributes set for the
file and there has been no reason to load the file data at this point.
For now, if you need those flags to be up to date, your only option is
to either use `git_diff_foreach` or create a `git_patch`.

this pull request fixes #962

@jdavid
Copy link
Copy Markdown
Member

jdavid commented Oct 31, 2021

My concern is that building the patch would be a waste of time if the flags are not used later.
The alternative would be to build the patch lazily, when the flags are asked for, but this may not be easy.

I've done the related commit 464836c , if none of GIT_DIFF_FLAG_BINARY and GIT_DIFF_FLAG_NOT_BINARY have been set then the flags have not been loaded and the patch should be built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong binary state of a delta if patches have not been iterated

2 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy