Re: Multiple paths in GIT_EXEC_PATH
From: Junio C Hamano <hidden>
Date: 2017-10-17 21:08:17
Kevin Daudt [off-list ref] writes:
The commit that changed what you described is 1073094f3 (git-sh-setup: be explicit where to dot-source git-sh-i18n from., 2016-10-29). That commit claims there were already scripts that assumed GIT_EXEC_PATH is just a single entry. That commit was included in v2.11. There was also a recent thread[0] about it that discussed this issue, where someone stated that indeed treating GIT_EXEC_PATH with the same semantics as PATH has been broken for a while, but it seems there are no real plans to fix it.
The variable was never meant to have more than one path concatenated with ':' from day one. In C code we've used it as a leading directory path to tack a command name to form a path to give to exec(3), without any intention to have it a list of paths, which is split at ':'. sh-setup was doing "PATH=$GIT_EXEC_PATH:$PATH" without rejecting a value in GIT_EXEC_PATH with a colon in it but that was merely being lazy and made it "work" by accident.