Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for zdiff3 conflict-style from Git 2.35 #795

Closed
taladar opened this issue Jan 26, 2022 · 4 comments · Fixed by #839
Closed

Support for zdiff3 conflict-style from Git 2.35 #795

taladar opened this issue Jan 26, 2022 · 4 comments · Fixed by #839

Comments

@taladar
Copy link

taladar commented Jan 26, 2022

Setting the new zdiff3 conflictStyle with

[merge]
    conflictStyle = zdiff3

in my global .gitignore leads to errors in e.g. cargo-deny like

2022-01-26 10:53:03 [ERROR] failed to fetch advisory database: git operation failed: unknown style 'zdiff3' given for 'merge.conflictstyle'; class=Checkout (20)

Since their source-code does not mention diff3 (the old value of that setting) but it uses git2-rs as a dependency and your source code does I assume it needs to be fixed on your end.

This is particularly annoying since that also means I can't use it with git itself.

@extrawurst
Copy link
Contributor

That probably needs to to libgit2 upstream to support, or?

@taladar
Copy link
Author

taladar commented Jan 26, 2022

Possibly, I am not sure how your library (or libgit2) uses the conflict style.

@extrawurst
Copy link
Contributor

like I said please open this conversation up in libgit2 repo

@fbernier
Copy link

fbernier commented Feb 10, 2022

This has now been fixed in libgit2 with libgit2/libgit2#6195.

Note to anyone ending up on this issue from googling around, it seems like cargo check or cargo build on any rust project are currently returning an error whenever someone has the zdiff3 conflictstyle in their git config.

 unknown style 'zdiff3' given for 'merge.conflictstyle'; class=Checkout (20)

I guess the first step toward fixing this would be to update the libgit2 version used in git2-rs, so that it can eventually make its way into cargo.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants