From e05e957bb4048a7e40b3095c59fb4e2847bd2dfe Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Sun, 10 Mar 2019 19:05:24 +0300 Subject: [PATCH] added integration with git diff --- Diff/Mod/Main.odc | Bin 12272 -> 12542 bytes README | 35 +++++++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/Diff/Mod/Main.odc b/Diff/Mod/Main.odc index 04c0728fae0af4790bc12c133cda0074ea5d28d3..ec2890b8ff7d7a770d897d8e52afa21229bb429e 100644 GIT binary patch delta 222 zcmewm|1WVuJyW&8#Ku^zlllw{oD2*M2lXeuaAC^UpRC7dCtRw_z`zd_%mvaAAT+t2 z(VxkgfAR&!1jZMW4Vj`D119$}8A~r@1}ex0DdGhYt3X^3cf+WC}qe!*I7{7_1Hv#qot_vVdi MOPDvOXw6~+00U|vQvd(} diff --git a/README b/README index 5c03ad5..a2a699c 100644 --- a/README +++ b/README @@ -7,12 +7,12 @@ Clone of diff and diff3 utilites from *nix for BlackBox and its binary Compound Commands -------------------- -To use tools within Blackbox just compile DevDiff. +To use tools within Blackbox just compile DiffBase and DiffUtils. DiffUtils.Compare (guard TextCmds.FocusGuard) Compare texts from two windows. - You can directly replace DevSearch.Compare with it in Dev/Rsrc/Menus.odc. + You can directly replace DevSearch.Compare with DiffUtils.Compare in Dev/Rsrc/Menus.odc. ^Q DiffUtils.CompareThis [">" ] @@ -36,24 +36,39 @@ Call `odctool help` to learn how to use it. Integration with Git -------------------- -It is possible to integrate three-way merge with git. +1. Compile odctool. -1. Open .git/config and add this lines: +2. Create script odctool-gitdiff: + + #! /bin/sh + odctool diff -p "$1" "$2" "$5" + +3. Add to .git/config: [merge "odctool"] name = BlackBox Compound Document merge driver - driver = /full/path/to/odctool merge -p %P -o %A %A %O %B + driver = /path/to/odctool merge -p %P -o %A %A %O %B + [diff "odctool"] + name = BlackBox Compound Document diff driver + command = /path/to/odctool-gitdiff + +4. Add to .git/info/attributes: + + *.odc merge=odctool diff=odctool + + +5. Optionally you can ignore some BlackBox related files if add to .git/info/exclude: -2. Open/create .git/info/attributes and add this line: + *.ocf + *.osf + odc[0-9][0-9][0-9][0-9][0-9] - *.odc merge=odctool -Now when conflict occurs, it marked like diff3 directly in odc file. -Checked not only text, but also views and formatting. +Now you can see diffs using `git diff' and resolve conflicts from BlackBox. Current state -------------------- This is NOT final version of subsustem Diff and odctool. It is NOT well tested, you are warned! -Also, program and user interface are not stable yet, so it can be changed in future. +Also, program and user interfaces are not stable yet, so it can be changed in future. -- 2.29.2