Bug 469853 - git mergetool does not resolve conflicts if using kdiff3
Summary: git mergetool does not resolve conflicts if using kdiff3
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (show other bugs)
Version: 1.10.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-16 14:45 UTC by kde_bugs
Modified: 2023-06-02 16:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 1.10.4
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kde_bugs 2023-05-16 14:45:46 UTC
SUMMARY
***
I have try to merge main into another branch. After calling `git mergetool` to resolve conflicts.
Kdiff3 does not open any gui and git mark the files as resolve, but the files dose still include the unresolved conflicts.
No error message is show.
Git mergetool does work  fine with meld (`git config --global merge.tool meld`), so I think this is a kdiff3 issue.
```rust
fn main() -> tetra::Result {
<<<<<<< HEAD
	let players = usb::Players::init();
	ContextBuilder::new(format!("{CARGO_PKG_NAME} v{CARGO_PKG_VERSION}"), 640, 480)
||||||| 20867de
	println!("{:?}", LEVELS[0]);
	ContextBuilder::new(format!("{CARGO_PKG_NAME} v{CARGO_PKG_VERSION}"), 640, 480)
=======
	my_env_logger_style::just_log();
	info!("{:?}", LEVELS[0]);
	ContextBuilder::new(format!("{CARGO_PKG_NAME} v{CARGO_PKG_VERSION}"), 1280, 720)
>>>>>>> main
		.quit_on_escape(true)
```
***


STEPS TO REPRODUCE
merge https://github.com/LuckyTurtleDev/m3/tree/main (d3ef2cd) into https://github.com/LuckyTurtleDev/m3/tree/bincode (0cefeb1)
```bash
❯ git merge main
Auto-merging Cargo.lock
CONFLICT (content): Merge conflict in Cargo.lock
Auto-merging pc/Cargo.toml
CONFLICT (content): Merge conflict in pc/Cargo.toml
Auto-merging pc/src/main.rs
CONFLICT (content): Merge conflict in pc/src/main.rs
Automatic merge failed; fix conflicts and then commit the result. 
```
```bash
❯ git mergetool
Merging:
Cargo.lock
pc/Cargo.toml
pc/src/main.rs

Normal merge conflict for 'Cargo.lock':
  {local}: modified file
  {remote}: modified file

Normal merge conflict for 'pc/Cargo.toml':
  {local}: modified file
  {remote}: modified file

Normal merge conflict for 'pc/src/main.rs':
  {local}: modified file
  {remote}: modified file
```

OBSERVED RESULT
dont resolve conflicts

EXPECTED RESULT
resolve conflicts ?

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 michael 2023-05-21 16:59:55 UTC
You should now get a UI if auto-merge fails. This was a combination of a regression from 34d36270c926a05e08391e623ecf3fae044c3a26 and a preexisting condition that didn't flag failed-auto merges as unless there was a write error.

See:

https://invent.kde.org/sdk/kdiff3/-/commit/9b494c55ee215ab212a7751c36991eb4b6892525
https://invent.kde.org/sdk/kdiff3/-/commit/c41ce64adb2680f3874abb03567d9e61574c2920
Comment 2 kde_bugs 2023-06-02 16:01:28 UTC
Can confirm that is fixed now. Have hit a merge conflict today and everything works fine again.

Thanks for the fix