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

RE: Renaming "non-contrib" things out of contrib/* (was "Re: [Bug] git-credential-netrc.perl[...]")

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 24, 2021, 17:21 UTC
Message-ID
<60abe0b32dfa1_1b2092081d@natae.notmuch>
In-Reply-To
<87o8d0o2or.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 28 quoted lines
> 
> On Sun, May 23 2021, Felipe Contreras wrote:
> 
> > Jeff King wrote:
> >
> >> I suspect that just opening a bug report against distro packages might
> >> get some traction (especially if it comes with a patch to create the
> >> extra package).
> >
> > I have tried that; do doesn't work. If git developers have $x in
> > "contrib" it's for a reason.
> >
> >> I do wonder if packagers are hesitant to reach into
> >> contrib/,
> >
> > Of course they are! The word "contrib" has an obvious meaning.
> 
> [Minor edit to the quoted text to inline the link]:
> 
> > This is precisely the reason why I tried to graduate
> > "contrib/completion" out of "contrib" to no avail:
> > https://lore.kernel.org/git/1399607587-14127-1-git-send-email-felipe.contreras@gmail.com/
> 
> Seems like that patch just got no replies at the time. FWIW I'd very
> much be for it and would encourage you to re-submit it.
> 
> I'm not sure s/shared/contrib/g is the best naming though, but maybe I'm
> contributing to needless bikeshedding by mentioning that.
It is the best location because that's where completions go.

You can check the location bash-completion suggests to install completions to:

  % pkg-config --variable=completionsdir bash-completion
  /usr/share/bash-completion/completions
In the case of zsh it's /usr/share/zsh/site-functions.

Additionally, if you install them in your home directory, it should be $XDG_DATA_HOME/bash-completion/completions.

$XDG_DATA_HOME is $HOME/.local/share (analogous to /usr/share).
> You apparently named it like that to match where distros usually install
> it (/usr/share), but we also have docs there, locale, and the perl/
> directory usually (well, at least on my distro) ends up there.

Distributions install them there, because that's where they are expected (by bash-completion and zsh).

Show 5 quoted lines
> I wonder if just a top-level completion/* wouldn't be best, or if we
> want to group them all together something like
> optional/{completion,credential}/ or other name suggesting that these
> are meant to interact with not-always-present 3rd party software. Maybe
> integrations/* ?
extra/ is a better name.

However, there's already many things that are optional, like gitk and git-gui, do they belong there too? For that matter locales are optional too.

I think if such a decison to have an extra/ directory is made, it should be orthogonal to the completion graduation.

Show 6 quoted lines
> For some of these names a general re-arrangement of contrib/* would be a
> logical thing to follow, e.g. I think it would make sense to carve out
> various ci/, contrib/coccinelle, Documentation/doc-diff,
> check-builtins.sh etc. and other "only for supporting git.git
> development" or "only called by our own Makefile(s)" into some
> consistently named pattern.
Me too.
Show 7 quoted lines
> I'm also very much in favor of building and testing all of this software
> by default, to the best of our ability. We've had some avoidable bitrot
> e.g. in subtree and mw-to-git in the past, some of that is a pain to
> test (e.g. requiring an installed MediaWiki), but we can usually
> build/test some part of it (e.g. in that case, does it even compile as
> Perl code?). In other cases we could compile/test things by default on
> certain platforms if they're platform-specific.
Yeah, some spring cleaning would be good.
I'll put sending the patch in my unending to-do list.
Cheers.
-- 
Felipe Contreras
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 10 of 17 in “[Bug] git-credential-netrc.perl is not built and is not available in `exec-path`”
  1. SiavashMay 20, 2021
  2. Jonathan NiederMay 20, 2021
  3. SiavashMay 21, 2021
  4. brian m. carlsonMay 21, 2021
  5. Jeff KingMay 21, 2021
  6. brian m. carlsonMay 21, 2021
  7. Jeff KingMay 23, 2021
  8. Felipe ContrerasMay 24, 2021
  9. Renaming "non-contrib" things out of contrib/* (was "Re: [Bug] git-credential-netrc.perl[...]")Ævar Arnfjörð Bjarmason, May 24, 2021
  10. Felipe ContrerasMay 24, 2021
  11. Ævar Arnfjörð BjarmasonMay 24, 2021
  12. Felipe ContrerasMay 25, 2021
  13. Junio C HamanoMay 25, 2021
  14. Bagas SanjayaMay 25, 2021
  15. Felipe ContrerasMay 25, 2021
  16. Felipe ContrerasMay 25, 2021
  17. Jeff KingMay 21, 2021

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.