git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Cc: git@vger.kernel.org, Shourya Shukla <shouryashukla.oo@gmail.com>,
	christian.couder@gmail.com, liu.denton@gmail.com
Subject: Re: [PATCH 1/2] submodule: port subcommand 'set-branch' from shell to C
Date: Sun, 17 May 2020 08:06:45 -0700	[thread overview]
Message-ID: <xmqqtv0e7g8q.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <4e36c8a0-4f43-79f8-137f-5fd080066af6@gmail.com> (Kaartic Sivaraam's message of "Thu, 14 May 2020 14:37:37 +0530")

Kaartic Sivaraam <kaartic.sivaraam@gmail.com> 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@gmail.com> 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.

Thanks.


  reply	other threads:[~2020-05-17 15:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 20:17 [PATCH 1/2] submodule: port subcommand 'set-branch' from shell to C Shourya Shukla
2020-05-13 20:17 ` [PATCH 2/2] submodule: Add 'quiet' option in subcommand 'set-branch' Shourya Shukla
2020-05-14 10:15   ` Denton Liu
2020-05-16  5:50     ` Shourya Shukla
2020-05-16  8:56       ` Denton Liu
2020-05-16 10:40         ` Shourya Shukla
2020-05-16 11:06           ` Denton Liu
2020-05-14  9:07 ` [PATCH 1/2] submodule: port subcommand 'set-branch' from shell to C Kaartic Sivaraam
2020-05-17 15:06   ` Junio C Hamano [this message]
2020-05-17 15:21     ` Kaartic Sivaraam
2020-05-14 10:10 ` Denton Liu
2020-05-16 10:37   ` Shourya Shukla
2020-05-16 10:55     ` Denton Liu
2020-05-17 16:11 ` Đoàn Trần Công Danh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqtv0e7g8q.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kaartic.sivaraam@gmail.com \
    --cc=liu.denton@gmail.com \
    --cc=shouryashukla.oo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).