Skip to content

Turn the difftool into a builtin

Johannes Schindelin git 6 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 0 repliesNew
  2. v53 patches 7 repliesSuperseded
  3. v44 patches 11 repliesApplied
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches35 repliesSuperseded
v21 patch3 repliesSuperseded
v12 patches9 repliesSuperseded

Changes in v6 from the cover letter

- reworded the commit message of 2/3 to account for the change in v4 where we no longer keep both scripted and builtin difftool working (with the switch difftool.useBuiltin deciding which one is used).

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3difftool: add a skeleton for the upcoming builtin.gitignore Makefile builtin.h +4 more+75 -10 replies
2/3difftool: implement the functionality in the builtinbuiltin/difftool.c+671 -10 replies
3/3Retire the scripted difftool.gitignore Makefile builtin/difftool.c +3 more+47 -970 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/3] Turn the difftool into a builtin

This patch series converts the difftool from a Perl script into a builtin, for three reasons:

1. Perl is really not native on Windows. Not only is there a performance penalty to be paid just for running Perl scripts, we also have to deal with the fact that users may have different Perl installations, with different options, and some other Perl installation may decide to set PERL5LIB globally, wreaking havoc with Git for Windows' Perl (which we have to use because almost all other Perl distributions lack the Subversion bindings we need for git svn).

2. As the Perl script uses Unix-y paths that are not native to Windows, the Perl interpreter has to go through a POSIX emulation layer (the MSYS2 runtime). This means that paths have to be converted from Unix-y paths to Windows-y paths (and vice versa) whenever crossing the POSIX emulation barrier, leading to quite possibly surprising path translation errors.

3. Perl makes for a rather large reason that Git for Windows' installer weighs in with >30MB. While one Perl script less does not relieve us of that burden, it is one step in the right direction.

Changes since v5:

- reworded the commit message of 2/3 to account for the change in v4 where we no longer keep both scripted and builtin difftool working (with the switch difftool.useBuiltin deciding which one is used).

Johannes Schindelin (3):
difftool: add a skeleton for the upcoming builtin
difftool: implement the functionality in the builtin Retire the scripted difftool

 Makefile                                           |   2 +-
 builtin.h                                          |   1 +
 builtin/difftool.c                                 | 692 +++++++++++++++++++++
 .../examples/git-difftool.perl                     |   0
 git.c                                              |   1 +
 t/t7800-difftool.sh                                |  92 +--
 6 files changed, 741 insertions(+), 47 deletions(-)
 create mode 100644 builtin/difftool.c
 rename git-difftool.perl => contrib/examples/git-difftool.perl (100%)

base-commit: ffac48d093d4b518a0cc0e8bf1b7cb53e0c3d7a2
Published-As: https://github.com/dscho/git/releases/tag/builtin-difftool-v6
Fetch-It-Via: git fetch https://github.com/dscho/git builtin-difftool-v6

Signature · 1 line
2.11.0.windows.3