Skip to content
New issue

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

Improve binary detection #1043

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Commits on Sep 26, 2023

  1. Improve binary detection

    libgit2 optimizes around not loading the content, when there's no
    content callbacks configured.
    
    So we aren't able to get a clear answer from radicle-surf if a file in a
    diff is a binary or not.
    
    A simple way without doing additional API requests is to check if the
    file type is a executable and if there are no hunks (since we don't get
    any deltas in binaries), this is a strong
    indicator for a binary.
    
    Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
    sebastinez committed Sep 26, 2023
    1 Configuration menu
    Copy the full SHA
    bd6ba78 View commit details
    Browse the repository at this point in the history