Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A comprehensive list of candidate files to remove from the installer was obtained by running the tests with GIT_TEST_INSTALLED=/mingw64/bin/ after starting Sysinternals' Process Monitor, filtering the output by the path of the portable Git, then saving the output as CSV and post-processing it with sed -n "2,\$s/\([^,]*,\)\{4\}\"\([^\"]*\).*/\2/p" /c/Logfile.CSV | uniq | tr \\\\ / | sed -n "s/^C:\/minimize-portable-git\///p" | sort | uniq | tee /c/min.paths then -- once -- running (cd / && find -xdev -type f) | grep -v "^\\./\(bin\|tmp\)/" | sed -n "s/^\\.\\///p" | tee /c/cur.paths in the portable Git directory, and then determining which files have not been used by the test suite with cat /c/cur.paths /c/min.paths /c/min.paths | sort | uniq -u | tee /c/unneeded.paths Of course this was followed by a very careful analysis in order to avoid overzealous culling (e.g. file(1)'s `/usr/share/misc/magic.mgc` file is still needed, even if the test suite does not use the file tool). To allow dropping the entire terminfo file tree *except* for the required "dumb" and "xterm" family, we use an extra grep call using GNU grep's `--perl-regexp` option to switch to Perl-style regular expressions, allowing negative look-ahead to be used (we cannot just turn the entire grep call into a single `--perl-regexp` call, though, because that option allows only one pattern). In this developer's tests, this patch reduced the size of the installer from around 43MB to 27MB. This fixes git-for-windows/git#262. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
- Loading branch information