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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 393F71F4B9 for ; Fri, 24 Jan 2020 19:27:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390079AbgAXT1o (ORCPT ); Fri, 24 Jan 2020 14:27:44 -0500 Received: from pb-smtp20.pobox.com ([173.228.157.52]:63506 "EHLO pb-smtp20.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389270AbgAXT1o (ORCPT ); Fri, 24 Jan 2020 14:27:44 -0500 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 1A57FBC264; Fri, 24 Jan 2020 14:27:42 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=+Rtm/JdNhhdfImJiiSfzO4gk8eY=; b=umCrHA raV5a3IJVqPd0FAPsTEym781SWgkTmkJVeBcTpH4WhraqAZMGoX79CDJDhA9zirp Gakwc72Rd6g1iAmuu4gtYx4hT8yBZtUu+lJgRJkVqfnlb3HIEkRRNjl2DMIzjPYt 6JxG645stncIbcQxcWM8PxSGCRMl8IihVDqFQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=GXIQmLLpSwKz/vgrXkGi95oQwe78PoXu jrRgy1QAqIoKo458e1VysPL1fvA5rzSPXwLd9D0JYTjLin/qFY5DuGRCoJRLMGkc 8dWwz8SrEmyxz05RmpJPE3tu73A9Zj1PCtw1ZzWONy0Whe7Kyy5f7kHKiXs2Ps3Y mawevEWmWHI= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 118FFBC263; Fri, 24 Jan 2020 14:27:42 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.76.80.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id DBB9CBC262; Fri, 24 Jan 2020 14:27:37 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff King Cc: David =?utf-8?Q?Burstr=C3=B6m?= , git@vger.kernel.org Subject: Re: Bug or unexpected behaviour in git show :a\b References: <20200124190119.GB1672342@coredump.intra.peff.net> Date: Fri, 24 Jan 2020 11:27:35 -0800 In-Reply-To: <20200124190119.GB1672342@coredump.intra.peff.net> (Jeff King's message of "Fri, 24 Jan 2020 14:01:19 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 948CC55A-3EDF-11EA-94F3-B0405B776F7B-77302942!pb-smtp20.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jeff King writes: > So everything is working as designed, or at least explainable. But I > think there is some room for improvement. A backslash that isn't > followed by a glob meta-character _is_ still a meta character (your > "a\b" would be globbing for "ab"). But it's useless enough that I think > it shouldn't be enough to trigger the "oh, you probably meant this as a > pathspec" DWIM rule. This sounds sensible. > We _could_ also say "even though this could technically be a pathspec > because of its metacharacter, it looks vaguely enough like a > path-in-tree revision that we shouldn't guess". That I'm less > comfortable with, just because it makes the heuristics even more > magical. Not just it becomes more magical, I am afraid that the code to implement such a heuristics would be fragile and become a source of unnecessary bugs. Let's not go there. I should learn to use "working as designed or at least explainable" more often in my responses, by the way. That's quite a useful and good phrase ;-)