Re: [PATCH 07/10] git submodule update: pass --prefix only with a non empty prefix
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Sep 17, 2015, 20:33 UTC
- Message-ID
- <CAPig+cQtrL1jN+iePU8BBqQSrbDC78y_bPrb-MwnrqEHysmiGA@mail.gmail.com>
- In-Reply-To
- <1442453948-9885-8-git-send-email-sbeller@google.com>
On Wed, Sep 16, 2015 at 9:39 PM, Stefan Beller <sbeller@google.com> wrote:
> We should not pass --prefix NULL into the helper. Although the helper > can deal with it, it's just messy.
Perhaps the commit message can explain under what conditions $prefix will be null...
Show 17 quoted lines
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
> diff --git a/git-submodule.sh b/git-submodule.sh
> index 7ef3247..3ccb0b6 100755
> --- a/git-submodule.sh
> +++ b/git-submodule.sh
> @@ -700,7 +700,7 @@ Maybe you want to use 'update --init'?")"
>
> if ! test -d "$sm_path"/.git && ! test -f "$sm_path"/.git
> then
> - git submodule--helper clone ${GIT_QUIET:+--quiet} --prefix "$prefix" --path "$sm_path" --name "$name" --url "$url" "$reference" "$depth" || exit
> + git submodule--helper clone ${GIT_QUIET:+--quiet} ${prefix:+--prefix "$prefix"} --path "$sm_path" --name "$name" --url "$url" "$reference" "$depth" || exit
> cloned_modules="$cloned_modules;$name"
> subsha1=
> else
> --
> 2.6.0.rc0.131.gf624c3d