You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1) A description of the issue. A screenshot is often helpful too.
The difft output for a merge conflict is not useful because it diffs the wrong things together. For branches X and Y, with common ancestor B, it shows a diff between X and Y.
This is not useful information for the purpose of solving the merge conflict. It's impossible to tell from this output if the result should say motorbike vs car, or if it should say father vs parents.
It would be better to show two diffs: the first between B and X, and the second between B and Y.
See the output from delta, as an example:
From this output, it's possible to deduce that the result should refer to motorbike and parents
(2) A copy of what you're diffing. If you're diffing files, include
the before and after files. If you're using difftastic with a VCS
repository (e.g. git), include the URL and commit hash.
difft story.txt
For the following story.txt (example taken from this article, which I highly recommend)
<<<<<<< HEAD
Alice asked her father if she could
borrow his motorbike. He said ok but told
||||||| 104f349
Alice asked her father if she could
borrow his car. He said ok but told
=======
Alice asked her parents if she could
borrow their car. They said ok but told
>>>>>>> master
her she had to be back by 11pm.
(3) The version of difftastic you're using (see difft --version) and
your operating system.
Difftastic 0.51.1
macOS 13.5
The text was updated successfully, but these errors were encountered:
Yeah, this would be a reasonable addition. Note that there's no guarantee that a base version is present, but I agree the diff3 is easier to reason about.
I'm not sure what's the best way to display this though. Difftastic assumes a 2-way diff, so if I simply all of base against the left and all of base against the right, you end up scrolling a lot to compare each case.
I've been using a script I hacked together to generate two diffs and present them both with xxdiff, which looks like the delta example above.
What I decided on was to show just the first conflict section found in the file, and I will iterate on fixing each conflict, saving the file, and running this tool again to see the next conflict.
I would love to see difftastic have a command line option to make it behave similarly. I wouldn't want to see all the diffs all at once, I just want to see them one pair at a time as I'm working on resolving the conflicts. I would settle for two options to make it show either all the B -> X diffs at once or all the B -> Y diffs. But what is most important to me is being able to see the two diffs at the same time and visually check how to apply both changes correctly.
Sometimes a single logical code change gets broken up into multiple conflicts, and then going conflict-by-conflict doesn't work well. It would be mind blowing if there was a way to see a range of conflicts (by index number?) combined into a single pair of diffs.
(1) A description of the issue. A screenshot is often helpful too.
The difft output for a merge conflict is not useful because it diffs the wrong things together. For branches X and Y, with common ancestor B, it shows a diff between X and Y.
This is not useful information for the purpose of solving the merge conflict. It's impossible to tell from this output if the result should say
motorbike
vscar
, or if it should sayfather
vsparents
.It would be better to show two diffs: the first between B and X, and the second between B and Y.
See the output from
delta
, as an example:From this output, it's possible to deduce that the result should refer to
motorbike
andparents
(2) A copy of what you're diffing. If you're diffing files, include
the before and after files. If you're using difftastic with a VCS
repository (e.g. git), include the URL and commit hash.
For the following
story.txt
(example taken from this article, which I highly recommend)(3) The version of difftastic you're using (see
difft --version
) andyour operating system.
Difftastic 0.51.1
macOS 13.5
The text was updated successfully, but these errors were encountered: