libgit2 / libgit2sharp

Git + .NET = ❤
http://libgit2.github.com
MIT License
3.18k stars 887 forks source link

Error messages are not user friendly #1935

Open ali-bhutto opened 2 years ago

ali-bhutto commented 2 years ago

Error messages are not user friendly. Example shown below

Reproduction steps

1- On Entering wrong access token it shows, "too many redirects or authentication replays" 2- Checking out to another branch when file similar name is not committed. We see the error, "1 conflict prevents checkout", this is not clear because in this case we don't see any conflicts occurring.

Expected behavior

Actual behavior

Version of LibGit2Sharp (release number or SHA1)

0.27.0-preview-0158

Operating system(s) tested; .NET runtime tested

OS: Windows 10 .NET runtime: .NET 6.0

ethomson commented 2 years ago

2- Checking out to another branch when file similar name is not committed. We see the error, "1 conflict prevents checkout", this is not clear because in this case we don't see any conflicts occurring.

In this case, you need a conflict listener which will be called for each conflict. We wouldn't want to enumerate the conflicts in an error message since there could be arbitrarily many.