libgit2sharp icon indicating copy to clipboard operation
libgit2sharp copied to clipboard

should ignore BOM in .gitignore

Open skelter opened this issue 4 years ago • 8 comments

You are opening a bug report against the LibGit2Sharp project: we use GitHub Issues for tracking bug reports and feature requests. If you have a question about an API or usage, please ask on StackOverflow: http://stackoverflow.com/questions/tagged/libgit2sharp.

Otherwise, to report a bug, please fill out the reproduction steps (below) and delete these introductory paragraphs. Thanks!

Reproduction steps

  1. Try this with an existing repo. Put a BOM at the header of a .gitignore file, and a directory to ignore such as .vs/ on the same (top, first) line of the .gitignore file.
  2. confirm command-line native git still ignores the .vs directory.
  3. Write a quick program that uses libgit2sharp to look at the above repo and get the status.
  4. Get the status and note the status is marked dirty, and the .vs dir is listed as untracked, not ignored.

Expected behavior

The status reported by libgit2sharp should report status is clean. It should ignore the .vs dir.

Actual behavior

The .vs dir is listed as untracked, not ignored.

The status is dirty.

Version of LibGit2Sharp (release number or SHA1)

0.26.2

Operating system(s) tested; .NET runtime tested

Windows 10

skelter avatar Aug 13 '21 20:08 skelter

What does git do here? If it's ignoring BOMs that's new behavior and we need to remain compatible.

ethomson avatar Aug 13 '21 20:08 ethomson

ethomson, git seemed to happily ignore.

skelter avatar Aug 13 '21 20:08 skelter

Oops just read your point #2. Would you mind opening this on https://github.com/libgit2/libgit2 instead?

ethomson avatar Aug 13 '21 20:08 ethomson

sure. I'll give it a shot.

skelter avatar Aug 13 '21 20:08 skelter

posted https://github.com/libgit2/libgit2/issues/5984

skelter avatar Aug 13 '21 20:08 skelter

fun one, as most editors seem to make BOM's invisible. :D

skelter avatar Aug 13 '21 20:08 skelter

This appears to be fixed in 0.27.0 . LibGit2Sharp.0.26.2 -> LibGit2Sharp.0.27.0

LibGit2Sharp.NativeBinaries.2.0.306 -> LibGit2Sharp.NativeBinaries.2.0.319

suehshtri avatar Feb 26 '24 16:02 suehshtri

Thank you all for your hard work on this library.

suehshtri avatar Feb 26 '24 16:02 suehshtri