ctietze,
@ctietze@mastodon.social avatar

and users, have you figured out a way to tweak merge conflict/diff views so that the versions have more meaningful names?

E.g. merging foo into master, showing labels like "changes to be applied from foo" and "base from master" would be amazing.

stefanv,

@ctietze This would be convenient, but I'm not highly optimistic:

From git's source, xmerge.c:

        memset(dest + size, '<', marker_size);<br></br>        size += marker_size;<br></br>        if (marker1_size) {<br></br>            dest[size] = ' ';<br></br>            memcpy(dest + size + 1, name1, marker1_size - 1);<br></br>            size += marker1_size;<br></br>        }<br></br>

However, perhaps

git config --global merge.conflictStyle diff3<br></br>

helps a little bit?

https://magit.vc/manual/magit/Resolving-Conflicts.html

stefanv,

@ctietze And, if you're willing to use an external merge tool:

[merge]<br></br>    tool = meld<br></br>

https://meldmerge.org/
https://git-scm.com/docs/git-mergetool

ctietze,
@ctietze@mastodon.social avatar

@stefanv Yellow/blue color scheme is already great. Can't see red/green well 👍

I still run into cases like the one from the screenshot where I don't know which side is which.

ctietze,
@ctietze@mastodon.social avatar

@stefanv If the commit that's being referenced/diffed would be part of the UI (e.g. in the bottom/status bar) with a data maybe, that would help with context already!

Hmmm

stefanv,

@ctietze Maybe two sticky notes, one on each side of the screen 😅

ctietze,
@ctietze@mastodon.social avatar

@stefanv Then I need a git-controlled label printer :D

stefanv,

@ctietze 😂 Presumably, they don't jump around (or do they?!). Here's what you see when enabling 3-way merge.

I made the file, modified it in two branches (A and B), merged A onto main, then tried to merge B onto main.

I see the filenames include LOCAL and REMOTE, which also provides a hint.

ctietze,
@ctietze@mastodon.social avatar

@stefanv Thanks for checking! It should be possible for an app to gather more info, though, than these filename crutches. The commit for example only needs to be fetched once per resolution step, not even per file.

Got to check this out and propose patches left and right

stefanv,

@ctietze Nice, thanks! Please keep me in the loop, and feel free to tag me on related issues / patches.

ctietze,
@ctietze@mastodon.social avatar

@stefanv oh dear it's a Python app :) That's interesting

  • All
  • Subscribed
  • Moderated
  • Favorites
  • emacs
  • DreamBathrooms
  • magazineikmin
  • ngwrru68w68
  • ethstaker
  • thenastyranch
  • rosin
  • Youngstown
  • slotface
  • Durango
  • InstantRegret
  • kavyap
  • cubers
  • everett
  • tacticalgear
  • megavids
  • modclub
  • cisconetworking
  • mdbf
  • osvaldo12
  • GTA5RPClips
  • tester
  • khanakhh
  • anitta
  • provamag3
  • Leos
  • normalnudes
  • JUstTest
  • lostlight
  • All magazines