git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] completion: move out of contrib

From
Junio C Hamano <gitster@pobox.com>
Date
May 7, 2014, 00:28 UTC
Message-ID
<xmqq38gmctzn.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1399077403-19678-1-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 18 quoted lines
> These have been stable and widely used for quite a long time, they even
> have tests outside of the contrib area, and most distributions ship
> them, so they can be considered part of the core already.
>
> Let's move them out of contrib and install them by default.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  Makefile                                           | 5 ++++-
>  {contrib/completion => shared}/git-completion.bash | 0
>  {contrib/completion => shared}/git-completion.zsh  | 0
>  {contrib/completion => shared}/git-prompt.sh       | 0
>  t/t9902-completion.sh                              | 2 +-
>  t/t9903-bash-prompt.sh                             | 2 +-
>  6 files changed, 6 insertions(+), 3 deletions(-)
>  rename {contrib/completion => shared}/git-completion.bash (100%)
>  rename {contrib/completion => shared}/git-completion.zsh (100%)
>  rename {contrib/completion => shared}/git-prompt.sh (100%)
I am not sure whom this change is meant to help.
 - Those who build from source *and* care about having the latest
   completion must already have a way they have been using to
   install them.  They will have to change their procedure to adjust
   for the change of the path, *and* disable the part of "install"
   that installs it to $(sharedir) which is unlikely to match where
   they have been installing completion scripts.
 - Those who package completion for distros already have a way they
   have been using to install them.  They suffer the same as those
   who build from the source.
 - Those who use pre-packaged Git and completion scripts would not
   care.
 - Those who have *not* installed from the source may benefit for
   being able to say "make install" and let it be installed, but
   they have to dot-include /usr/share/git-completion.bash location,
   which is new, not from /etc/bash_completion.d/git as they are
   used to.
A better change might be to give a new Makefile target, perhaps
    $ make install.contrib-completion

without moving the scripts from their current place. That way, nobody gets hurt, and those who are new to Git who want to build and install from the source would not have to invent their own way to install stuff from contrib/ (the same goes for other contrib/ tools such as contrib/workdir/ we may want to add a new target to let you say "make install.contrib-workdir").

I _may_ be persuaded to fold the installation of all possible contrib/ stuff into the regular "make install", but I haven't thought things through.

The patch does two unrelated things:
 - Move things in the source tree.
 - Install the completion by default.

I very much agree that the latter may be a good thing to have in the polished end result. I am not sure if the installation location chosen is sensible. At least, another redirection

    git_completion_dir = $(sharedir)

may be necessary to allow people install these in the location they want.

Previous: Felipe ContrerasNext: Felipe Contreras
Message 2 of 6 in “completion: move out of contrib”
  1. completion: move out of contribFelipe Contreras, May 3, 2014
  2. Junio C HamanoMay 7, 2014
  3. Felipe ContrerasMay 7, 2014
  4. Felipe ContrerasMay 7, 2014
  5. Junio C HamanoMay 7, 2014
  6. Felipe ContrerasMay 7, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.