Re: [PATCH v8 1/3] submodule: add get_submodule_config helper funtion
- From
W. Trevor King <wking@tremily.us>
- Date
- Dec 21, 2012, 11:04 UTC
- Message-ID
- <20121221110425.GE16849@odin.tremily.us>
- In-Reply-To
- <20121221082033.GB560@book.hvoigt.net>
On Fri, Dec 21, 2012 at 09:20:33AM +0100, Heiko Voigt wrote:
Show 24 quoted lines
> On Wed, Dec 19, 2012 at 11:03:31AM -0500, wking@tremily.us wrote:
> > diff --git a/git-submodule.sh b/git-submodule.sh
> > index 2365149..263a60c 100755
> > --- a/git-submodule.sh
> > +++ b/git-submodule.sh
> > @@ -153,6 +153,32 @@ die_if_unmatched ()
> [...]
> > +get_submodule_config () {
> > + name="$1"
> > + option="$2"
> > + default="$3"
> > + value=$(git config submodule."$name"."$option")
> > + if test -z "$value"
> > + then
> > + value=$(git config -f .gitmodules submodule."$name"."$option")
> > + fi
> > + printf '%s' "${value:-$default}"
> > +}
> > +
> > +
> > +#
>
> Minor nit: For all other functions we only have one newline as
> separator.I'm fine rerolling this, or Junio can make the change on my behalf, or it can be left as is ;).
Cheers, Trevor
-- 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