From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-5.4 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 783181F89C for ; Wed, 18 Jan 2017 12:44:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753783AbdARMoT (ORCPT ); Wed, 18 Jan 2017 07:44:19 -0500 Received: from mout.gmx.net ([212.227.17.21]:64991 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894AbdARMoS (ORCPT ); Wed, 18 Jan 2017 07:44:18 -0500 Received: from virtualbox ([37.24.141.236]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M6730-1ceNEE3zzu-00yACG; Wed, 18 Jan 2017 13:44:05 +0100 Date: Wed, 18 Jan 2017 13:44:03 +0100 (CET) From: Johannes Schindelin X-X-Sender: virtualbox@virtualbox To: Jacob Keller cc: Johannes Sixt , Jacob Keller , Git mailing list Subject: Re: [PATCH 5/5] describe: teach describe negative pattern matches In-Reply-To: Message-ID: References: <20170112001721.2534-1-jacob.e.keller@intel.com> <20170112001721.2534-6-jacob.e.keller@intel.com> <5f723a0d-623f-bf97-00de-29d430484fed@kdbg.org> <5c8401ef-9609-f235-9228-be980a13edf1@kdbg.org> <97d4105c-0fa6-41c5-e456-30cebd93dc36@kdbg.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-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9vfR8RMKgh4bqGZ1FBJ2jwyyg2DD/e9VMieqcrOOQ7g5 T+eYUtrza2JEVs6awJMV8hf7pN3zcEfDY5LI0V8uvOfH648TJU5f7OiF0ELxXl0Dkd2L5p64d kv4c3uelikLw7dgZIzhLuVZI4XYYrb/BoxBUMqBcfquUOD2r88a3IzKL2D6ad6ObqfRXQssjy 4Zloh5kk8/sV+8p6M0PuK1HGPR4m6XjQjKmkBbi2ErTcaPfW0mEsPhixhyzMGJhNrBLCLYfEo EnI0XsH8OEaZnNQGMoBVRbs= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Jake, On Tue, 17 Jan 2017, Jacob Keller wrote: > On Fri, Jan 13, 2017 at 1:31 PM, Johannes Sixt wrote: > > Am 13.01.2017 um 07:57 schrieb Jacob Keller: > >> > >> On Thu, Jan 12, 2017 at 10:43 PM, Johannes Sixt wrote: > >>> > >>> When you write > >>> > >>> git log --branches --exclude=origin/* --remotes > >>> > >>> --exclude=origin/* applies only to --remotes, but not to --branches. > >> > >> > >> Well for describe I don't think the order matters. > > > > > > That is certainly true today. But I would value consistency more. We would > > lose it if some time in the future 'describe' accepts --branches and > > --remotes in addition to --tags and --all. > > > > -- Hannes > > > > I am not sure that the interface for git-log and git-describe are > similar enough to make this distinction work. --match already seems to > imply that it only works on refs in refs/tags, as it says it considers > globs matching excluding the "refs/tags" prefix. > > In git-describe, we already have "--tags" and "--all" but they are > mutually exclusive. We don't support using more than one at once, and > I'm not really convinced that describe will ever support more than one > at a time. Additionally, match already doesn't respect order. I agree that it would keep the code much simpler if you kept the order "exclude before include". However, should you decide to look into making the logic dependent on the order in which the flags were specified in the command-line, we do have a data structure for such a beast: we use it in gitignore and in sparse-checkout, it is called struct exclude_list. Just some food for thought, Johannes