Summary: | dev-vcs/git: 'git-prompt' is not really a bash-completion file | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Górny <mgorny> |
Component: | Current packages | Assignee: | Robin Johnson <robbat2> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, lukkash, maksbotan, ssuominen, zeekec |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Michał Górny
2013-07-23 15:56:51 UTC
+ 04 Feb 2014; Lars Wendler <polynomial-c@gentoo.org> git-1.8.1.5.ebuild, + git-1.8.1.5-r1.ebuild, git-1.8.2.1.ebuild, git-1.8.4.5.ebuild, + -git-1.8.5.2.ebuild, git-1.8.5.3.ebuild, git-9999.ebuild, + -files/git-1.7.12-git-svn-backport.patch, +files/git-daemon-r1.initd: + Added rewritten init script which no longer contains "need net" (bug + #490446). Added epatch_user (bug #497292). Added www-servers/nginx to the + list of server who work with git-instaweb (bug #491862). Removed reference to + no longer needed patch in remaining ebuilds. Removed old files and ebuilds. + Don't install git-prompt.sh as bash-completion file (bug #477920). + I don't think this was a good idea. What advantages did it have to remove the git-prompt script? Sure, it is not a bash-completion script, but *it is used just like one* - some users want it sourced in their shell sessions. At least the script was not removed completely from the ebuild - but still, dodoc'ing is inferior to the status quo. User who want to use it will either have to decompress the file and copy it somewhere appropriate or to add "sh" to PORTAGE_COMPRESS_EXCLUDE_SUFFIXES. Why all it needless complexity? The status quo did work fine for all users, both those who want the script and those who don't want it. Wasn't this just removing for removal's sake, without any technical reasons? (In reply to Luis Ressel from comment #2) > Why all it needless complexity? The status quo did work fine for all users, > both those who want the script and those who don't want it. Wasn't this just > removing for removal's sake, without any technical reasons? If it did work fine for *all* users, why did I report this bug? It should not go into bash-completion directory, which is /usr/share/bash-completion/completions, which is intended for autoloaded completion files at upstream level Our bash-completion is currently special, and is deviating from upstream's, but that doesn't mean nobody is running the autoloading -version (upstream version) So by all means, install the script, but just put it somewhere else, like /usr/share/git/ or such, from where user can then source it when he wants This just had me searching a bit. I think a better warning may be nice. Also the old location is still referenced in the ebuild 'einfo "Please read /usr/share/bash-completion/git-prompt for Git bash prompt"'. This is not a bug and should be reverted. The instructions on top of "git" say nearly the same thing as on top of "git-prompt": # 1) Copy this file to somewhere (e.g. ~/.git-completion.sh). # 2) Add the following line to your .bashrc/.zshrc: # source ~/.git-completion.sh # 3) Consider changing your PS1 to also show the current branch, # see git-prompt.sh for details. So, the user is expected to copy it (oh hold on, that's what the ebuild does for them, nice!), add something to their .bashrc (oh hold on, that's what eselect is, more or less, doing for them, on request, nice!), and then continue and do something else (but portage isn't doing the considering for the user, ah well, can't win 'em all). By installing it in usable form (not compressed), it means that as the user upgrades git, new shells will automatically get the updated prompt (assuming any fixes are applied). The new method means that users must remember to update their prompt script every time, even if it hasn't changed, just in case it has changed. Please revert. It worked fine for all users. There was no problem actually reported in this bug report, just some distaste for non-purism. Yes, it's not an "autocompletion" - but it otherwise fits in fine with eselect bashcomp as something users can add or remove at their whim. And it's both *convenient* and *managed* (fixes are applied appropriately) and thus seems to fit in quite well there with Gentoo's overall philosophies. (In reply to Tanktalus from comment #6) > Please revert. It worked fine for all users. There was no problem actually > reported in this bug report, just some distaste for non-purism. [...] The behavior of eselect is going to be changed to meet the workflow of new bash-completion. It will no longer work with this script. I fully agree with Michał that 'git-prompt' is not a bash-completion file. But as Luis and Tanktalus said, it is a real pity for users who actually use it and want to keep it always up to date. Would it be possible to not install it with dodoc but put it elsewhere in executable form? Then just add an einfo to tell the user that it's up to him to source that file. I've created a new bug #507480 to resolve the issue of bzipped git-prompt.sh in a doc directory. |