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

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

From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Date
May 17, 2020, 15:21 UTC
Message-ID
<b9c28f5c-d0da-7b54-7e9b-2e8cdce8b838@gmail.com>
In-Reply-To
<xmqqtv0e7g8q.fsf@gitster.c.googlers.com>
On 17-05-2020 20:36, Junio C Hamano wrote:
Show 27 quoted lines
> 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.
> 
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@tuxfamily.org>
 > Mentored-by: Kaartic Sivaraam<kaartic.sivaraam@gmail.com>
 > Signed-off-by: Shourya Shukla<shouryashukla.oo@gmail.com>
It might use more explanation, maybe.
-- 
Sivaraam
Previous: Junio C HamanoNext: Denton Liu
Message 10 of 14 in “submodule: port subcommand 'set-branch' from shell to C”
  1. 1/2 submodule: port subcommand 'set-branch' from shell to CShourya Shukla, May 13, 2020
  2. 2/2 submodule: Add 'quiet' option in subcommand 'set-branch'Shourya Shukla, May 13, 2020
  3. Denton LiuMay 14, 2020
  4. Shourya ShuklaMay 16, 2020
  5. Denton LiuMay 16, 2020
  6. Shourya ShuklaMay 16, 2020
  7. Denton LiuMay 16, 2020
  8. Kaartic SivaraamMay 14, 2020
  9. Junio C HamanoMay 17, 2020
  10. Kaartic SivaraamMay 17, 2020
  11. Denton LiuMay 14, 2020
  12. Shourya ShuklaMay 16, 2020
  13. Denton LiuMay 16, 2020
  14. Đoàn Trần Công DanhMay 17, 2020

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.