clr-bundles icon indicating copy to clipboard operation
clr-bundles copied to clipboard

git add --patch requires dev-utils

Open dmtucker opened this issue 5 years ago • 6 comments

If only the git bundle is installed (not dev-utils), git add -p emits an error:

$ git add -p
git: 'add--interactive' is not a git command. See 'git --help'.

I believe it is because of /usr/libexec/git-core/git-add--interactive (which is a perl script).

dmtucker avatar Mar 29 '20 23:03 dmtucker

the alternative is to have git pull in perl, which offends people at times

On Sun, Mar 29, 2020 at 4:01 PM David Tucker [email protected] wrote:

If only the git bundle is installed (not dev-utils), git add -p emits an error:

$ git add -p git: 'add--interactive' is not a git command. See 'git --help'.

I believe it is because of /usr/libexec/git-core/git-add--interactive (which is a perl script).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/clearlinux/clr-bundles/issues/189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FLRUX5SRSXLAXCRPJLRJ7HNNANCNFSM4LWE77SQ .

fenrus75 avatar Mar 30 '20 00:03 fenrus75

FWIW, this still occurs even if perl-basic is installed. It does seem a little odd that part of the git CLI is implemented in perl... Not sure why that would offend someone, though 🤔 Anyways, if this isn't something that ought to be changed, I wonder if there'd be a way to provide a better message (e.g. "Install the dev-utils bundle to use this.").

dmtucker avatar Mar 30 '20 00:03 dmtucker

FWIW, this still occurs even if perl-basic is installed. ...

@dmtucker You will see the command-not-found message when the shell cannot find the command you typed. (Error code 127)

But in this case you have git add -i, which invoked git-add. So it's not Error 127. The error you see is produced by git. So changing the error message requires you to patch git.

lebensterben avatar Mar 30 '20 01:03 lebensterben

A similar issue with git in bug #211 is without the bundle perl-extras, git send-email will fail if using TLS.

catleeball avatar Feb 24 '21 10:02 catleeball

requiring perl installed everywhere just to have normal git function is a bit ...offensive in a way.

On Wed, Feb 24, 2021 at 2:06 AM Lee Ball [email protected] wrote:

A similar issue with git in bug #211 https://github.com/clearlinux/clr-bundles/issues/211 is without the bundle perl-extras, git send-email will fail if using TLS.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/clearlinux/clr-bundles/issues/189#issuecomment-784961212, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FK5MFWPN5MFNFKETVDTATFRDANCNFSM4LWE77SQ .

fenrus75 avatar Feb 24 '21 14:02 fenrus75

@fenrus75 : I wish that a bunch of the git commands weren't implemented as Perl scripts either. But, here we are.

It seems sensible to add the Perl runtime dependencies to make Git work. Other distros seem to package perl dependencies with git, and the git install docs point out perl is needed for git add, git send-mail, and svn support.

If some users find Perl too odious, Clear could provide a separate git build with the NO_PERL build flag, or a git-extras bundle that adds perl and any other runtime deps. e.g.:

  • git
  • git-no-perl

or

  • git (as it is today)
  • git-extras (adds perl and required modules)

catleeball avatar Feb 24 '21 19:02 catleeball