From: Shourya Shukla Date: Wed, 27 May 2020 17:13:58 GMT Subject: Re: [PATCH v4] submodule: port subcommand 'set-branch' from shell to C Message-ID: <20200527171358.GA22073@konoha> In-Reply-To: <33127873-fb19-2bd5-3028-bcd1757e92e5@gmail.com> On 24/05 12:19, Kaartic Sivaraam wrote: > As '--quiet' in 'set-branch' is a no-op and is being accepted only for > uniformity, I think it makes sense to use OPT_NOOP_NOARG instead of > OPT__QUIET for specifying it, as suggested by Danh. > > Also, the description "suppress output for setting default tracking branch" > doesn't seem to be valid anymore as we don't print anything when set-branch > succeeds. I think it will all boil down to the consistency of all the subcommands. Changing this would require making changes in various places: the C code (obviously), the shell script (not only the cmd_set_branch() function but the part for accepting user input as well) and the Documentation (I might have maybe missed a couple of other changes to list here too). Its not that I don't want to do this, but it would add unnecessary changes don't you think? I would love it if others could weigh in their opinions too about this. > + git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper set-branch ${GIT_QUIET:+--quiet} ${branch:+--branch $branch} ${default:+--default} -- "$@" > Danh questioned whether '$branch' needs to be quoted here. I too think it > needs to be quoted unless I'm missing something. We want to do this because $branch is an argument right?