Re: [PATCH 1/2] submodule: port subcommand 'set-branch' from shell to C

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

 



On 17-05-2020 20:36, Junio C Hamano wrote:
Kaartic Sivaraam <kaartic.sivaraam@xxxxxxxxx> writes:

For those who lack the context, during the conversion of the script
Shourya faced an issue where the '--branch' argument did not work as
expected. He described the issue in a private e-mail where Christian
pointed out the following (quoting his reply hoping he doesn't mind):

On Tue, May 12, 2020 at 5:55 PM Christian Couder
<christian.couder@xxxxxxxxx> wrote:

In your commit (in submodule.sh line 781) there is:

         `git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix
"$prefix"} submodule--helper set-branch ${GIT_QUIET:+--quiet}
${branch:+--branch} ${default:+--default} -- "$@"`

Actually the issue might come from the above. I think it should use
${branch:+--branch $branch} instead of ${branch:+--branch}.

See: https://www.tldp.org/LDP/abs/html/parameter-substitution.html

That's why Shourya mentions the '$branch' as extra. Of course, that's
how it is supposed to be in the first place :)

Perhaps all of that should be removed from the log message and
instead go after the three-dash line then.


I believe it's already after the three-dash line. The log message reads:

> Convert submodule subcommand 'set-branch' to a builtin. Port 'set-branch'
> to 'submodule--helper.c' and call the latter via 'git-submodule.sh'.
>
> Mentored-by: Christian Couder<chriscool@xxxxxxxxxxxxx>
> Mentored-by: Kaartic Sivaraam<kaartic.sivaraam@xxxxxxxxx>
> Signed-off-by: Shourya Shukla<shouryashukla.oo@xxxxxxxxx>

It might use more explanation, maybe.

--
Sivaraam



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux