From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id A58C61F5AE for ; Wed, 19 May 2021 23:29:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230023AbhESXaf (ORCPT ); Wed, 19 May 2021 19:30:35 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:61257 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhESXae (ORCPT ); Wed, 19 May 2021 19:30:34 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 7D573B8534; Wed, 19 May 2021 19:29:13 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=J4QGFu4sIQZs5MxEeFPJm+n0NtK/G4waF91b06 Zrcgk=; b=NmEaE4tYp+0LLmWwvocEtlIJItHBt+eCFKnZuBFvKkFlTdtum5F0f/ e5SycTMWvV3lhpB6Tgtr6IzOgETe5VKTzR6kT4WR0RxCmtF/AvA5wD8zanA28V0A QamXIQvhdgEPOybhad1Fpc3y6t3ZpyUJRdjdhqZPVxmSeGWEY7NYQ= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 75F9FB8533; Wed, 19 May 2021 19:29:13 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.73.10.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id F175BB8531; Wed, 19 May 2021 19:29:12 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Christoph Anton Mitterer , Elijah Newren Cc: Git Mailing List Subject: Re: git-sh-prompt: bash: GIT_PS1_COMPRESSSPARSESTATE: unbound variable References: <681aefe15af98f6758f28544b96bc2eca90642f3.camel@scientia.net> Date: Thu, 20 May 2021 08:29:12 +0900 In-Reply-To: <681aefe15af98f6758f28544b96bc2eca90642f3.camel@scientia.net> (Christoph Anton Mitterer's message of "Wed, 19 May 2021 19:56:53 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 04FEB84E-B8FA-11EB-8FA4-74DE23BA3BAF-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Christoph Anton Mitterer writes: > Hey there. > > I think I found another case of an unbound variable: > > Completing e.g.: > git commit --[press TAB] > > gives: > $ git commit --bash: GIT_COMPLETION_SHOW_ALL: unbound variable It seems that OMIT_SPARSESTATE would have the same issue. if [ -z "${GIT_PS1_COMPRESSSPARSESTATE}" ] && [ -z "${GIT_PS1_OMITSPARSESTATE}" ] && all coming from afda36db (git-prompt: include sparsity state as well, 2020-06-21). But I think we have already seen the fix in 5c0cbdb1 (git-prompt: work under set -u, 2021-05-13), which may or may not appear in the upcoming release. There still are unprotected mentions of GIT_PS1_SHOWUPSTREAM even with that fix, though.