Re: git's directory is _prepended_ to PATH when called with an absolute path
On 22/04/15 14:02, brian m. carlson wrote: I want whatever ruby the user chooses. This is exactly what I want. The problem is that git overrides the user's choice by prepending /usr/bin to the path and thus making /usr/bin/env choose system's ruby version. Which is almost always not the Ruby the user chose. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git's directory is _prepended_ to PATH when called with an absolute path
On 22/04/15 02:47, Andreas Krey wrote: On Tue, 21 Apr 2015 18:37:29 +, David Rodríguez wrote: ... This causes issues with Ruby git hooks, because Ruby version managers rely on custom settings in PATH to select the Ruby executable, Even if git wouldn't modify PATH this is still a broken way to do that. What ruby to execute a hook with is a property of the hook, not of the user context invoking it. Andreas I probably shouldn't have mentioned Ruby version managers since they are not directly related to this issue. I'll try to elaborate on the issue: * User is relying on a custom path to select their Ruby version. For example, let's say the first folder in path is ~/.rubies/2.2.2/bin. * User runs /usr/bin/git commit and a pre-commit hook is triggered. * The pre-commit hook starts with #!/us/bin/env ruby to select the Ruby to be used in the hook, but since the path has been changed by /usr/bin/git, the selected ruby will be /usr/bin/ruby and not ~/.rubies/2.2.2/bin/ruby as the user would expect. What's the proper way to do whatever you're saying is done in a broken way? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git's directory is _prepended_ to PATH when called with an absolute path
Thanks Junio for the useful link, I'll comment there. On 21/04/15 18:48, Junio C Hamano wrote: http://thread.gmane.org/gmane.comp.version-control.git/267143/focus=267251 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
git's directory is _prepended_ to PATH when called with an absolute path
For example, if I run git using: $ /usr/bin/git then /usr/bin is prepended to the path. Is this intentional? If it is, why? This causes issues with Ruby git hooks, because Ruby version managers rely on custom settings in PATH to select the Ruby executable, and there's usually a system Ruby living in /usr/bin. See https://github.com/github/hub/issues/855 for an example. Thanks a lot, David Rodríguez. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: PATH modifications for git-hook processes
Jeff King peff at peff.net writes: If we can get away with just dropping this element from the PATH, I'd much rather do that than try to implement a complicated path-precedence scheme. -Peff I agree, GIT_EXEC_DIR should be enough and this surprising behavior would be avoided. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: git's directory is _prepended_ to PATH when called with an absolute path
I'm actually not sure how to reply to an old thread... From the thread I gather that the intention is to prevent this behavior and stop prepending git's directory to the path. Is that right? On 21/04/15 18:59, David Rodríguez wrote: Thanks Junio for the useful link, I'll comment there. On 21/04/15 18:48, Junio C Hamano wrote: http://thread.gmane.org/gmane.comp.versionlist-control.git/267143/focus=267251 -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Ubuntu may break Git upstream translations
I agree with Jiang. We should join translation efforts. And in this case, the best place to do it is upstream. El mar 10 dic 2013 10:56:19 CET, Jiang Xin escribió: Hi all, David find a typo in Spanish translations of Git, and ask me how to contribute, because he cannot find Spanish translations in Git source code. To my surprise, I cannot find either. Later I find out that David using Ubuntu (I use debian instead), and Ubuntu reinvent the wheel. Ubuntu has its own translation platform, and releases Git translations not with Git package itself, but releases Git translations in separate language specific packages. E.g. Spanish translations on Git is released in package language-pack-es-base. This language specific package includes not only Git translations, but also translations of over 200 other packages. URL of Ubuntu translation homepage on Git: * https://translations.launchpad.net/ubuntu/saucy/+source/git/+pots/git Version of Git in Ubuntu Saucy (13.10) is 1.8.3.2, but obviously the translations are based on git v1.8.0 (8 months older than v1.8.3.2). That's why even Ubuntu provides git translations in 21 different languages, but only 2 of them are 100% translated. We (Git upstream) provide Git translations in only 7 languages, but 5 of them are 100% translated now. Without context, it's hard to translate well. And contribute to upstream will benefit to more people than contribute to one specific Linux distribution. I cc this mail to Paco, the creator of Spanish translations for Git I found in this page: * https://translations.launchpad.net/ubuntu/saucy/+source/git/+pots/git/es/+details Paco may have interest on David's question. I also send this mail to Dimitri, the owner of Git translations for Ubuntu, for reference. 2013/12/9 David Rodríguez de Dios deivid.rodrig...@gmail.com: El lun 09 dic 2013 16:33:44 CET, Jiang Xin escribió: 2013/12/9 David Rodríguez de Dios deivid.rodrig...@gmail.com: El lun 09 dic 2013 15:59:12 CET, Jiang Xin escribió: 2013/12/9 David Rodríguez de Dios deivid.rodrig...@gmail.com: Hi Jiang Xin! I want to contribute to the Spanish translation by fixing a typo but I can't find the translation. Where is it? All available translations are in po/ directory of Git, such as po/de.po, po/pt_PT.po, etc. And all l10n teams, maintainers and locations of the official repositories are listed in po/TEAMS file. I can't find a Spanish translation either, but there is a Portuguese translation and the maintainer is Marco Sousa. I don't know how much differences between Spanish and Portuguese. Maybe the typo you found is belongs to po/pt_PT.po? No way... My git is translated into Spanish, that's why it surprises me that the translation is not there... What's your platform? version of your platform? git --version? And what's the output message (with the typo you found)? Maybe we could git grep in Git source code or google the output message. So $ uname -a Linux pantani 3.11.0-14-generic #21-Ubuntu SMP Tue Nov 12 17:07:40 UTC 2013 i686 i686 i686 GNU/Linux $ git --version git version 1.8.3.2 $ locale LANG=es_ES.UTF-8 LANGUAGE=es_ES LC_CTYPE=es_ES.UTF-8 LC_NUMERIC=es_ES.UTF-8 LC_TIME=es_ES.UTF-8 LC_COLLATE=es_ES.UTF-8 LC_MONETARY=es_ES.UTF-8 LC_MESSAGES=es_ES.UTF-8 LC_PAPER=es_ES.UTF-8 LC_NAME=es_ES.UTF-8 LC_ADDRESS=es_ES.UTF-8 LC_TELEPHONE=es_ES.UTF-8 LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=es_ES.UTF-8 LC_ALL= I've downloaded git sources with $ apt-get source git $ apt-get source git-core ... and grep the string, nothing. I've also forked the git repo and grep and nothing either. The message is msgid (use \git checkout -- file...\ to discard changes in working directory) Oh, and the incorrect message I'm getting is # (use «git checkout -- archivo...« para descartar cambios en le directorio de trabajo) El lun 09 dic 2013 16:45:17 CET, David Rodríguez de Dios escribió: -- Jiang Xin -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html