sh-tools: add a run_merge_tool function
PATCH v2 6/8 sh-tools: add a run_merge_tool function
This function launches merge tools and will be used to refactor git-(diff|merge)tool.
---
This fixes the problems spotted by Markus.
Documentation/git-sh-tools.txt | 3 + git-sh-tools.sh | 160 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 154 insertions(+), 9 deletions(-)
Documentation/git-sh-tools.txt +3 -0
@@ -36,6 +36,9 @@ init_merge_tool_path:: sets up `$merge_tool_path` according to '(diff|merge)tool.<tool>.path' configurations. +run_merge_tool:: + runs the specified merge tool. + Author ------ Written by David Aguilar <[email protected]>
git-sh-tools.sh +151 -9
190 lines not on this page · raw message
Signature · 1 line
1.6.2.1.303.g63699
Quoted 2 lines · David Aguilar
This function launches merge tools and will be used to refactor git-(diff|merge)tool.
Thanks for writing difftool; I find it quite useful. I tried it with tkdiff, and noticed that it shows the 'merge preview' window even though it isn't doing a merge. If a user with unstaged changes were to carelessly click the 'save and exit' button, his changes could be lost. So I think it's a good idea to stop the merge preview window from showing up under difftool. To do that I think you just have to remove the '-o "$MERGED"' option to tkdiff.
James
James Pickens, 31.03.2009:
Quoted 11 lines · David Aguilar
Quoted 2 lines
This function launches merge tools and will be used to refactor git-(diff|merge)tool.
Thanks for writing difftool; I find it quite useful. I tried it with tkdiff, and noticed that it shows the 'merge preview' window even though it isn't doing a merge. If a user with unstaged changes were to carelessly click the 'save and exit' button, his changes could be lost. So I think it's a good idea to stop the merge preview window from showing up under difftool. To do that I think you just have to remove the '-o "$MERGED"' option to tkdiff.
This mail made me see an issue with your patch series. Sorry, I haven't seen this earlier, my review was just scratching the surface, I merely applied it and looked through it, but didn't actually test it. Lack of time.
The invocations seem to be appropriate only for mergetool, it is just the invocations from the old git-mergetool.sh, not from the old git-difftool-helper.sh. This means, git-difftool opens 3 files instead of 2.
I think there are preset diff tools, which opened 3 files instead of 2 before this series (I just tested kdiff3, it opened 3 files). Seems to be originated from the fact, that they were initially copied from git-mergetool.sh.
Markus
Quoted 4 lines · Markus Heidelberg
James Pickens, 31.03.2009:
Quoted 3 lines · David Aguilar
Quoted 2 lines
This function launches merge tools and will be used to refactor git-(diff|merge)tool.
sorry this whole series is being rewriten...
Quoted 26 lines
Quoted 8 lines
Thanks for writing difftool; I find it quite useful. I tried it with tkdiff, and noticed that it shows the 'merge preview' window even though it isn't doing a merge. If a user with unstaged changes were to carelessly click the 'save and exit' button, his changes could be lost. So I think it's a good idea to stop the merge preview window from showing up under difftool. To do that I think you just have to remove the '-o "$MERGED"' option to tkdiff.
This mail made me see an issue with your patch series. Sorry, I haven't seen this earlier, my review was just scratching the surface, I merely applied it and looked through it, but didn't actually test it. Lack of time.
The invocations seem to be appropriate only for mergetool, it is just the invocations from the old
git-mergetool.sh, not from the oldgit-difftool-helper.sh. This means, git-difftool opens 3 files instead of 2.I think there are preset diff tools, which opened 3 files instead of 2 before this series (I just tested kdiff3, it opened 3 files). Seems to be originated from the fact, that they were initially copied from
git-mergetool.sh.Markus
Signature · 1 line
David
Quoted 12 lines · James Pickens
Quoted 2 lines · David Aguilar
This function launches merge tools and will be used to refactor git-(diff|merge)tool.
Thanks for writing difftool; I find it quite useful. I tried it with tkdiff, and noticed that it shows the 'merge preview' window even though it isn't doing a merge. If a user with unstaged changes were to carelessly click the 'save and exit' button, his changes could be lost. So I think it's a good idea to stop the merge preview window from showing up under difftool. To do that I think you just have to remove the '-o "$MERGED"' option to tkdiff.
Quoted 1 line
James
Hi James
I included your suggestion in my latest patch series. Once things settle down with the current series I'll add diffuse to {diff,merge}tool and friends.
So, yup, this shouldn't be an issue in future versions of difftool.
Thanks
Signature · 1 line
David