Skip to content

Commit

Permalink
mingit: query the current git.exe for the system config location
Browse files Browse the repository at this point in the history
In git-for-windows/git#2358, we fixed the design
where Git for Windows would first read a "public" system config that was
not even in `C:\Program Files\Git` and then would read a "private"
system config. It now only reads _one_ system config, and that is in an
intuitive location: `C:\Program Files\Git\etc\gitconfig`.

Let's teach the script that generates the MinGit subset of Git for
Windows to make sure to ask `git.exe` what its idea of the system config
location is, and then use that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Oct 17, 2019
1 parent 298825e commit db8555e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mingit/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ case "$SCRIPT_PATH" in
;;
esac

etc_gitconfig="$(git -c core.editor=echo config --system -e 2>/dev/null)" &&
etc_gitconfig="$(cygpath -au "$etc_gitconfig")" &&
etc_gitconfig="${etc_gitconfig#/}" ||
die "Could not determine the path of the system config"

rm -rf "$SCRIPT_PATH"/root &&
mkdir -p "$SCRIPT_PATH"/root ||
die "Could not create overlay directory"
Expand All @@ -72,7 +77,7 @@ test -z "$include_pdbs" || {
die "Could not unpack .pdb files"

# Make a list of files to include
LIST="$(ARCH=$ARCH BITNESS=$BITNESS MINIMAL_GIT=1 \
LIST="$(ARCH=$ARCH BITNESS=$BITNESS MINIMAL_GIT=1 ETC_GITCONFIG="$etc_gitconfig" \
PACKAGE_VERSIONS_FILE="$SCRIPT_PATH"/root/etc/package-versions.txt \
sh "$SCRIPT_PATH"/../make-file-list.sh "$@")" ||
die "Could not generate file list"
Expand Down

0 comments on commit db8555e

Please sign in to comment.