lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master f303642: Rework a failing command


From: Vadim Zeitlin
Subject: Re: [lmi] [lmi-commits] master f303642: Rework a failing command
Date: Thu, 1 Oct 2020 16:27:31 +0200

On Thu,  1 Oct 2020 09:17:30 -0400 (EDT) Greg Chicares 
<gchicares@sbcglobal.net> wrote:

GC> branch: master
GC> commit f3036427ff5e869e73b0c77d05c1f91a96c077f0
GC> Author: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
GC> 
GC>     Rework a failing command
GC>     
GC>     This:
GC>       git clone
GC>       git submodule update --init
GC>     resulted in
GC>       fatal: not a git repository (or any of the parent directories): .git

 Oops, of course :-( Sorry for not testing this and making this stupid
mistake.

GC>     whereas manually running this:
GC>       git clone
GC>       cd subdir_created_by_git_clone
GC>       git submodule update --init
GC>     succeeded.
GC>     
GC>     The preceding commit (retained because it's valuable in itself) happened
GC>     to work around this problem. The present commit resolves the problem.

 Thanks for resolving this!

GC>     This alternative was tried:
GC>     
GC>         clone_opts="$coefficiency --recurse-submodules"
GC>         git clone      "$clone_opts" git://git.savannah.nongnu.org/lmi.git \
GC>           || [...similarly...]
GC>     
GC>     but it failed, with 'set -vx' output [one long line split to fit here]:
GC>     
GC>     + git clone --jobs=32 --recurse-submodules \
GC>      git://git.savannah.nongnu.org/lmi.git
GC>     error: option `jobs' expects a numerical value
GC>     
GC>     ...which seems to suggest fragility in git's command-line parser.

 I think it's just shell quoting rearing its ugly head again. Using quotes
around $clone_opts prevents splitting on whitespace, so argv[2] for git is
the string "--jobs=32 --recurse-submodules" (without quotes) and the string
"32 --recurse-submodules" is not a valid numerical value, of course. In
fact, it's good that Git gives an error here, if it silently accepted this
as "32", "--recurse-submodules" just wouldn't work and you'd have no idea
why.

 Regards,
VZ

Attachment: pgpZw8E8lr4oN.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]