{"thread":{"id":"46986","subject":"Multiple paths in GIT_EXEC_PATH","startedAt":"2017-10-17T15:21:30Z","lastAt":"2017-10-24T20:12:40Z","messageCount":4,"participants":["Nikolay Yakimov","Kevin Daudt","Junio C Hamano","Dennis Kaarsemaker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"330543","messageId":"CA+A=rXEyQ4aQL=p55f_+kbbrnDyDr9ULSq9gqBE2YE9y6+oJ3w@mail.gmail.com","threadId":"46986","inReplyTo":null,"subject":"Multiple paths in GIT_EXEC_PATH","fromName":"Nikolay Yakimov","fromEmail":"root@livid.pp.ru","sentAt":"2017-10-17T15:21:22Z","receivedAt":"2017-10-17T15:21:30Z","isPatch":false,"sender":{"key":"root@livid.pp.ru","avatar":null},"body":"Hello. After updating to a recent git release (2.14, I believe, but\npossibly earlier), setting GIT_EXEC_PATH to multiple directories\nstopped working. It did work before, and I believe the culprit is\n'git-sh-setup', which uses 'git --exec-path' output directly, while\nmost other git components observe PATH syntax, i.e. multiple paths\nwith colon separator. Is this intended, or is it an oversight?\n\nFor why I need that is another matter. Long story short, I need git to\nlook for '.gitignore' in a particular non-standard location, since I\nhave multiple git repositories in the same workdir (that workdir being\n$HOME and git repositories being stores for my different configs)\n"},{"id":"330547","messageId":"20171017155625.GE19335@alpha.vpn.ikke.info","threadId":"46986","inReplyTo":"CA+A=rXEyQ4aQL=p55f_+kbbrnDyDr9ULSq9gqBE2YE9y6+oJ3w@mail.gmail.com","subject":"Re: Multiple paths in GIT_EXEC_PATH","fromName":"Kevin Daudt","fromEmail":"me@ikke.info","sentAt":"2017-10-17T15:56:25Z","receivedAt":"2017-10-17T15:56:32Z","isPatch":false,"sender":{"key":"me@ikke.info","avatar":"https://avatars.githubusercontent.com/u/135698?v=4"},"body":"On Tue, Oct 17, 2017 at 06:21:22PM +0300, Nikolay Yakimov wrote:\n> Hello. After updating to a recent git release (2.14, I believe, but\n> possibly earlier), setting GIT_EXEC_PATH to multiple directories\n> stopped working. It did work before, and I believe the culprit is\n> 'git-sh-setup', which uses 'git --exec-path' output directly, while\n> most other git components observe PATH syntax, i.e. multiple paths\n> with colon separator. Is this intended, or is it an oversight?\n> \n> For why I need that is another matter. Long story short, I need git to\n> look for '.gitignore' in a particular non-standard location, since I\n> have multiple git repositories in the same workdir (that workdir being\n> $HOME and git repositories being stores for my different configs)\n\nThe commit that changed what you described is 1073094f3 (git-sh-setup:\nbe explicit where to dot-source git-sh-i18n from., 2016-10-29). That\ncommit claims there were already scripts that assumed GIT_EXEC_PATH is\njust a single entry. That commit was included in v2.11.\n\nThere was also a recent thread[0] about it that discussed this issue,\nwhere someone stated that indeed treating GIT_EXEC_PATH with the same\nsemantics as PATH has been broken for a while, but it seems there are no\nreal plans to fix it.\n\n[0]:https://public-inbox.org/git/20170928223134.GA30744@varnish/\n\n\n"},{"id":"330574","messageId":"xmqqo9p5mqit.fsf@gitster.mtv.corp.google.com","threadId":"46986","inReplyTo":"20171017155625.GE19335@alpha.vpn.ikke.info","subject":"Re: Multiple paths in GIT_EXEC_PATH","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-10-17T21:08:10Z","receivedAt":"2017-10-17T21:08:17Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Kevin Daudt <me@ikke.info> writes:\n\n> The commit that changed what you described is 1073094f3 (git-sh-setup:\n> be explicit where to dot-source git-sh-i18n from., 2016-10-29). That\n> commit claims there were already scripts that assumed GIT_EXEC_PATH is\n> just a single entry. That commit was included in v2.11.\n>\n> There was also a recent thread[0] about it that discussed this issue,\n> where someone stated that indeed treating GIT_EXEC_PATH with the same\n> semantics as PATH has been broken for a while, but it seems there are no\n> real plans to fix it.\n\nThe variable was never meant to have more than one path concatenated\nwith ':' from day one.\n\nIn C code we've used it as a leading directory path to tack a\ncommand name to form a path to give to exec(3), without any\nintention to have it a list of paths, which is split at ':'.\nsh-setup was doing \"PATH=$GIT_EXEC_PATH:$PATH\" without rejecting a\nvalue in GIT_EXEC_PATH with a colon in it but that was merely being\nlazy and made it \"work\" by accident.\n\n"},{"id":"330961","messageId":"1508875952.2750.35.camel@kaarsemaker.net","threadId":"46986","inReplyTo":"CA+A=rXEyQ4aQL=p55f_+kbbrnDyDr9ULSq9gqBE2YE9y6+oJ3w@mail.gmail.com","subject":"Re: Multiple paths in GIT_EXEC_PATH","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2017-10-24T20:12:32Z","receivedAt":"2017-10-24T20:12:40Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On Tue, 2017-10-17 at 18:21 +0300, Nikolay Yakimov wrote:\n> For why I need that is another matter. Long story short, I need git to\n> look for '.gitignore' in a particular non-standard location, since I\n> have multiple git repositories in the same workdir (that workdir being\n> $HOME and git repositories being stores for my different configs)\n\nThat is solvable without needing multiple directories in\n$GIT_EXEC_PATH. vcsh, which also solves the 'multiple repos with same\nworkdir' problem in a very thin wrapper around git, does this by\nsetting core.excludesfile in the per repo config to a unique path.\n\nhurricane:~$ vcsh dotfiles config core.excludesfile\n.gitignore.d/dotfiles\nhurricane:~$ vcsh secrets config core.excludesfile\n.gitignore.d/secrets\n\nD.\n"}]}