libgit2 / libgit2/libgit2sharp

Patch diff with ignore white space

Open
#1,778 3 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

When creating a patch diff using Diff.Compare I did not find any option to ignore white space.

I think CompareOptions should contain an enum corresponding to the git diff settings:

--ignore-all-space
--ignore-space-change
--ignore-space-at-eol

Currently there is a WhitespaceMode in SimilarityOptions. However, this is intended for handling white space while detecting renames and copies.

I intend to submit a pull request for this.

Version of LibGit2Sharp

4de700fe

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 at Diff.Compare and CompareOptions, then compare them with SimilarityOptions and its existing WhitespaceMode. Check how the three listed Git whitespace settings map into the comparison path; done means Compare supports those modes and tests verify each setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, git
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.