From: Junio C Hamano Date: Wed, 20 Apr 2022 23:41:02 GMT Subject: Re: [PATCH v5 23/28] fsmonitor: never set CE_FSMONITOR_VALID on submodules Message-ID: In-Reply-To: <5db241f7d2f654d46d4858ce9e9413032705abf3.1650487399.git.gitgitgadget@gmail.com> "Jeff Hostetler via GitGitGadget" writes: > +create_super () { > + super=$1 && > + > + git init "${super}" && It is not wrong per-se, but a simple reference to a shell variable without magic interpolation like ${parameter-word} is easier to read without {} around the variable name, i.e. git init "$super" an exception of course is when you want to suffix its value with alnum, i.e. for d in "$super" "${super}1" "$super"2 do ... and writing it as "${super}1" would probably be easier to see what is going on than "$super"2 notation. > + echo x >${super}/file_1 && > + echo y >${super}/file_2 && > + echo z >${super}/file_3 && CodingGuidelines still says that these redirection targets with variable interpolation must be enclosed in double-quotes, i.e. echo x >"$super/file_1" && > + mkdir ${super}/dir_1 && The double quotes around "${super}" we saw on "git init" indicates that the helper function wants to be prepared to handle a directory path with possibly $IFS whitespace characters in it correctly, so let's make sure we are consistently prepared for such a parameter, i.e. mkdir "$super/dir_1" && The same applies to the rest of the script. Thanks.