Re: [PATCH] git-submodule add: Record branch name in .gitmodules
- From
W. Trevor King <wking@tremily.us>
- Date
- Oct 25, 2012, 01:12 UTC
- Message-ID
- <20121025011227.GH801@odin.tremily.us>
- In-Reply-To
- <CABURp0rpPqeTJMYXmgMG2CmU=SzzvCMeX46rnMVB0EeB_LXPiA@mail.gmail.com>
On Wed, Oct 24, 2012 at 02:12:18PM -0400, Phil Hord wrote:
> + VAR_NAME=$(printf '%s' > "$VAR_NAME" | tr A-Z a-z | sed -e 's/^[^a-z]/_/' -e 's/[^a-z0-9]/_/g')
Is there a reason why you use printf instead of echo?
Also, this sort of name cleaning should probably live in a new function:
clean_environment_variable()
or some such. Is there a git-utility-functions.sh library hiding somewhere in the source? ;)
-- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy