libgit2 / libgit2/libgit2sharp

There is no way to make Diff Patch contain any binary deltas

Open
#1,966 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

Description

Reproduction steps

use Diff.Compare to create a patch that contains BinaryComparisons
save this patch to a file patch.file
call git apply with the created patch.file

Expected behavior

there should be a user settable CompareOption that gives access to the GIT_DIFF_SHOW_BINARY flag in Core.GitDiff.GitDiffOptionFlags so that a patch can be created with binary deltas so that binaries are created/updated in the repo after calling git apply patch.file

Actual behavior

there is no option to set this flag so binaries are not created and or not updated by the patch file

Version of LibGit2Sharp (release number or SHA1)

0.27.0-preview-0175

Operating system(s) tested; .NET runtime tested

windows 10
macOS
ubuntu 20.04

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Diff.Compare and CompareOption into Core.GitDiff.GitDiffOptionFlags, focusing on how existing flags are exposed. Confirm the change by creating a patch with BinaryComparisons and applying it with git apply; done means the patch includes binary deltas and creates or updates the binaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.