Re: [PATCH 3/3] git-submodule.sh: improve parsing of short options
- From
- Roy E <royeldar0@gmail.com>
- Date
- Dec 9, 2024, 16:21 UTC
- Message-ID
- <CAOfFammyK1Ef4_gOV+a5hiZR+Xhgu0o+=1Uu4BE2bGUACo3Jtg@mail.gmail.com>
- In-Reply-To
- <xmqqr06jrqiv.fsf@gitster.g>
Hi,
Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> As I said in the devil's advocate section in my review for 1/3, I > often find the value of the variable spelling out the option name > as well as the option value (i.e., force="--force", not force=1; > branch="--branch=foo", not branch=foo; jobs=--jobs=4, not jobs=4) > easier to debug and drive other programs using these variables, so I > do not mind jobs=--jobs=4 at all, but if we want to be consistent in > the other direction, this would probably want to be modified in the > name of consistency?
I find this approach better as well, and I agree this is easier to read, and has some other advantages like better ability to debug the script. I modified the script so that all of the variables are assigned values which contain the option name as well as the option value, and I will post a v2 patch series soon.
> Other than that, all three patches looked sane to me.
Thanks a lot!