From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75557C48BDF for ; Fri, 11 Jun 2021 01:02:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 55DF061359 for ; Fri, 11 Jun 2021 01:02:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbhFKBEO (ORCPT ); Thu, 10 Jun 2021 21:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230321AbhFKBEN (ORCPT ); Thu, 10 Jun 2021 21:04:13 -0400 Received: from mav.lukeshu.com (mav.lukeshu.com [IPv6:2001:19f0:5c00:8069:5400:ff:fe26:6a86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EABADC061574 for ; Thu, 10 Jun 2021 18:02:16 -0700 (PDT) Received: from lukeshu-dw-thinkpad (unknown [IPv6:2601:281:8200:42e:4e34:88ff:fe48:5521]) by mav.lukeshu.com (Postfix) with ESMTPSA id 33E1D80590; Thu, 10 Jun 2021 21:02:16 -0400 (EDT) Date: Thu, 10 Jun 2021 19:02:15 -0600 Message-ID: <878s3h6wo8.wl-lukeshu@lukeshu.com> From: Luke Shumaker To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, Luke Shumaker , Johannes Schindelin Subject: Re: [PATCH 2/2] subtree: fix assumption about the directory separator In-Reply-To: <4e1a569c9fa494fa9bb1bfde14d77ac9751d9049.1623316412.git.gitgitgadget@gmail.com> References: <4e1a569c9fa494fa9bb1bfde14d77ac9751d9049.1623316412.git.gitgitgadget@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, 10 Jun 2021 03:13:31 -0600, Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin > > On Windows, both forward and backslash are valid separators. In > 22d550749361 (subtree: don't fuss with PATH, 2021-04-27), however, we > added code that assumes that it can only be the forward slash. > > Let's fix that. > > Signed-off-by: Johannes Schindelin > --- > contrib/subtree/git-subtree.sh | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh > index 6bd689a6bb92..d11ac56f9eb8 100755 > --- a/contrib/subtree/git-subtree.sh > +++ b/contrib/subtree/git-subtree.sh > @@ -13,6 +13,8 @@ if test -z "$GIT_EXEC_PATH" || { > } > } || ! test -f "$GIT_EXEC_PATH/git-sh-setup" > then > + base=${0##*/} > + base=${base##*\\} This might be more clearly written as base=${0##*[/\\]} ? (And then maybe it doesn't need a separate variable, and can still be written in-line?) -- Happy hacking, ~ Luke Shumaker