Your comments

That's excellent news!
What is the release date for 22.1 as I'll be upgrading the moment it comes out.

This would be extremely helpful in combination with Git-LFS.

I'm writing this comment for future reference and to verify I understand things correctly / for others who are in the same situation:

While there is a "Diff Tools" setup, which provides the arguments one would want for writing a diff tool, namely:

- Access to the contents of both sides of the diff.

- Context auto-running. (Only opens when you double click a file that has changes)

You should NOT set it up under this tab.

You should create a script under External Tools that:

- In someway accesses the proper contents required from the diff given the filepath & commit.  

      - I don't seem to have access to the same script variables as in the Diff Tools

      - I'm not sure whether this would work for diffing in history / log (?), I only seem to be able to have access to a single file path & commit.

      - Note that we use SmartGIT for different types of repos, so I will need to write scripts for all: Git, Git LFS, etc

- Set "Show output and wait until finished" 


Remaining questions, for external tools:
- Outside manually triggering them, when are External Tools called?

- Are they called when double-clicking a file that is changed? As the setup seems to be that the Diff Tool is called then.

- What is the output format accepted by SmartGIT?  

     - You mention that "SmartGit can show the output."

        How does it display this? What is required?
- "similar to the "Print Git version" default external tool.".  I have no idea where this exists, nor can I find it in my default settings.

Alternatively, if you have SmartSynchronize, it's probably better to write a script under Diff Tools that does the diffing, and then feeds the information into SmartSynchronize.

> If the compare tool shows the result to the command line, SmartGit can show the output.

As per the request, could you maybe elaborate / provide a working example? The above provided script simply doesn't do anything if I double click the changed file. It runs in the background upon double-click, given that the tmp files get generated, but SmartGIT doesn't do anything

Would it be possible to get an example of setting up a script that shows the output in SmartGIT's "Changes" tab (and how to configure it in SmartGIT)?
I'm running into issue where the commandline script is properly setup, returning a diff to commandline, but I can't seem to get it setup in SmartGIT.

> If the compare tool shows the result to the command line, SmartGit can show the output.

If setup in `Diff Tools` as an `External diff tool`, using `${leftFile} ${rightFile}` as arguments I don't get the output piped in the "Changes" tab.

@echo off
REM Simple script that prettifies JSON and sorts it so the DIFFs make more sense, requires jq
REM Sort JSON on key, and pretty print to temp file
setlocal enabledelayedexpansion
jq-win64 . -S %1% >tmpFileA
set v1=
for /f "delims=" %%i in ('type tmpFileA') do set v1=!v1! %%i
REM Same for second argument
jq-win64 . -S %2% >tmpFileB
set v2=
for /f "delims=" %%i in ('type tmpFileB') do set v2=!v2! %%i
REM Diff and cleanup
diff tmpFileA tmpFileB
del tmpFileA
del tmpFileB

CLI output: 

8c8
<       "$type": "A"
---
>       "$type": "B"

To be clear, with:

> create an external tool that does what you want and invoke that

Do you mean that I can have the output of some tool piped into SmartGITs "Changes" window?

In our case, one of the usecases is minified JSON that we want to have properly diffed for the content creators inside SmartGit. Natively, it's shown as a single compressed line in SmartGit.

Is there a way to mimic `text conv` functionality such that the JSON file is pretty-formatted for the purposes of the diff shown inside SmartGit?

The external tools as I understand it launch a separate process (not-smartGit).


I'm generally disappointed by the lack of support for GIT functionality outside core requirements in SmartGIT. 
It's becoming quite a bother in anything but the simplest of repositories. Whenever we run into an issue that is solved in minutes in a normal git repository (e.g. the above, or alternatively, commit templates) the solution in SmartGIT is either non-existant because of ill-support of default git functionality, or workarounds are convoluted and brittle.

With that in mind, my question then is whether SmartGIT will properly support Git functionality like the above in the (near) future?
Or, which given the timeline on this issues and related ones seems more likely, is this not planned at all, and is SmartGIT aimed at more casual users? I.e.: more experience users should look elsewhere?


The problem with the current template support is that it completely overrides the merge-conflict generated messages, which we very much prefer over a static-warning commit style message.