All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Haggerty <mhagger@alum.mit.edu>
Cc: Tom Grennan <tmgrennan@gmail.com>,
	Albert Yale <surfingalbert@gmail.com>,
	pclouds@gmail.com, git@vger.kernel.org, krh@redhat.com,
	jasampler@gmail.com
Subject: Re: [RFC/PATCH] tag: make list exclude !<pattern>
Date: Mon, 13 Feb 2012 12:29:58 -0800	[thread overview]
Message-ID: <7vaa4meat5.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <4F391F5C.1000400@alum.mit.edu> (Michael Haggerty's message of "Mon, 13 Feb 2012 15:34:04 +0100")

Michael Haggerty <mhagger@alum.mit.edu> writes:

>> Having said all that, if your argument against using "^" as negation for
>> for-each-ref *were* with something like this from the beginning:
>> 
>>     git rev-list --all --exclude-refs=refs/tags/v\*
>> 
>> it would have been very different. I would wholeheartedly buy the
>> consistency argument that says
>> 
>>     git for-each-ref --exclude-refs=refs/tags/v\*
>> 
>> ought to give all refs (only because for-each-ref "all" is implied) except
>> for the tagged tips, and
>> 
>>     git log --all --exclude-refs=refs/tags/v\*
>> 
>> should be the notation to produce consistently the same result as
>> 
>>     git log $(git for-each-ref --format='%(objectname)' --exclude-refs=refs/tags/v\*)
>> 
>> but if we used "^" as negated match in for-each-ref argument, we would
>> close the door to give such consistency to log family of commands later.
>
> That *has* been exactly my argument from the beginning [1].

Well, if the only thing you say is "rev-list A B ^C" and you are expecting
that your reader to substitute A with any dashed option like --all, --not
or --stdin, I would have to say you are expecting too much.  I wouldn't
even think of substituting A with $(git for-each-ref refs/heads/) in such
an example.

> I cautiously hope that we are now talking about the same thing, even if it
> is not yet clear whether we agree on a conclusion.

I think we are on the same page now.  Given that we seem to have settled
for the recent "find in the paths that pathspec matches, but exclude
matches from paths that match these patterns" topic by Albert Yale to
tentatively use separate --exclude [*1*] command line option instead of
mixing the negatives to the usual list of positives at the UI level, it
appears to me that the most sensible way forward would be to expose the
negative match to the UI level is to introduce a similar --exclude-refs on
the command line.

That would eventually allow us to say something like [*2*]:

	git log --all \
            --exclude-refs=refs/heads/experimental/* \
            --exclude-paths=compat/ \
	    --since=30.days \
            -- '*.c'

to ask for recent changes to all C sources outside the compat/ area for
everything except for the experimental topics.


[Footnote]

*1* It might be better to spell this as --exclude-paths, though, if we are
going to call this other exclude-refs-by-pattern --exclude-refs.  The
longer names would not bother us with the help of parse-options, and the
commands that need to support both, namely the commands in the log family,
need to allow users to be explicit which exclusion they want anyway, and
having --exclude vs --exclude-refs as options that work on different
dimensions look asymmetric.

*2* "something like" includes using a convenience short-hand on this
command line such as "--branches --exclude-branches=experimental/*"
instead of "--all --exclude-refs=...", but I consider that is icing on the
cake after the first step to define the overall structure settles, so I
would prefer not to go into the tangential details.

  reply	other threads:[~2012-02-13 20:30 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 19:43 [RFC/PATCH] tag: make list exclude !<pattern> Tom Grennan
2012-02-09 19:43 ` Tom Grennan
2012-02-10  0:00   ` Tom Grennan
2012-02-10  6:34 ` Nguyen Thai Ngoc Duy
2012-02-10 18:55   ` Tom Grennan
2012-02-11  2:16     ` Tom Grennan
2012-02-11  3:06       ` Junio C Hamano
2012-02-11  7:50         ` Junio C Hamano
2012-02-11 10:13           ` Jakub Narebski
2012-02-11 14:06             ` Nguyen Thai Ngoc Duy
2012-02-11 18:31             ` Junio C Hamano
2012-02-11 19:47           ` Tom Grennan
2012-02-11  7:50         ` Michael Haggerty
2012-02-11  8:13           ` Junio C Hamano
2012-02-13  5:29             ` Michael Haggerty
2012-02-13  6:37               ` Junio C Hamano
2012-02-13  9:37                 ` Michael Haggerty
2012-02-13 10:23                   ` Junio C Hamano
2012-02-13 14:34                     ` Michael Haggerty
2012-02-13 20:29                       ` Junio C Hamano [this message]
2012-02-11 19:08         ` Tom Grennan
2012-02-22  1:28           ` [PATCHv3 0/5] " Tom Grennan
2012-02-22  1:28           ` [PATCHv3 1/5] refs: add match_pattern() Tom Grennan
2012-02-22  6:33             ` Junio C Hamano
2012-02-22 23:47               ` Tom Grennan
2012-02-23  0:17                 ` Junio C Hamano
2012-02-23  0:59                   ` Tom Grennan
2012-02-22  1:28           ` [PATCHv3 2/5] tag --points-at option wrapper Tom Grennan
2012-02-22  1:28           ` [PATCHv3 3/5] tag --exclude option Tom Grennan
2012-02-22  6:33             ` Junio C Hamano
2012-02-23  0:22               ` Tom Grennan
2012-02-23  1:00                 ` Junio C Hamano
2012-03-01  1:45                 ` [PATCH 0/5] modernize test style Tom Grennan
2012-03-03  2:15                   ` [PATCHv2 " Tom Grennan
2012-03-03  8:04                     ` Junio C Hamano
2012-03-03 17:42                       ` Tom Grennan
2012-03-03  2:15                   ` [PATCHv2 1/5] t7004 (tag): modernize style Tom Grennan
2012-03-03 21:31                     ` Johannes Sixt
2012-03-03  2:15                   ` [PATCHv2 2/5] t5512 (ls-remote): " Tom Grennan
2012-03-03  8:05                     ` Junio C Hamano
2012-03-03 17:33                       ` Tom Grennan
2012-03-03  2:15                   ` [PATCHv2 3/5] t3200 (branch): " Tom Grennan
2012-03-03  2:15                   ` [PATCHv2 4/5] t0040 (parse-options): " Tom Grennan
2012-03-03  2:15                   ` [PATCHv2 5/5] t6300 (for-each-ref): " Tom Grennan
2012-03-03  2:15                   ` [PATCHv2-w 101/105] t7004 (tag): " Tom Grennan
2012-03-03  2:15                   ` [PATCHv2-w 102/105] t5512 (ls-remote): " Tom Grennan
2012-03-03  2:15                   ` [PATCHv2-w 103/105] t3200 (branch): " Tom Grennan
2012-03-03  2:15                   ` [PATCHv2-w 104/105] t0040 (parse-options): " Tom Grennan
2012-03-03  2:15                   ` [PATCHv2-w 105/105] t6300 (for-each-ref): " Tom Grennan
2012-03-01  1:45                 ` [PATCH 1/5] " Tom Grennan
2012-03-01  6:53                   ` Johannes Sixt
2012-03-01 15:58                     ` Tom Grennan
2012-03-01  1:45                 ` [PATCH 2/5] t5512 (ls-remote): " Tom Grennan
2012-03-01  8:36                   ` Thomas Rast
2012-03-01  1:45                 ` [PATCH 3/5] t3200 (branch): " Tom Grennan
2012-03-01  1:45                 ` [PATCH 4/5] t0040 (parse-options): " Tom Grennan
2012-03-01  1:45                 ` [PATCH 5/5] t7004 (tag): " Tom Grennan
2012-03-01  1:45                 ` [PATCH-w 101/105] t6300 (for-each-ref): " Tom Grennan
2012-03-01  2:13                   ` Junio C Hamano
2012-03-01  3:20                     ` Tom Grennan
2012-03-01  3:26                       ` Junio C Hamano
2012-03-01  5:10                         ` Tom Grennan
2012-03-01  5:57                           ` Tom Grennan
2012-03-01  8:42                           ` Thomas Rast
2012-03-01 15:48                             ` Tom Grennan
2012-03-01  1:45                 ` [PATCH-w 102/105] t5512 (ls-remote): " Tom Grennan
2012-03-01  1:45                 ` [PATCH-w 103/105] t3200 (branch): " Tom Grennan
2012-03-01  1:45                 ` [PATCH-w 104/105] t0040 (parse-options): " Tom Grennan
2012-03-01  1:45                 ` [PATCH-w 105/105] t7004 (tag): " Tom Grennan
2012-02-22  1:28           ` [PATCHv3 4/5] branch --exclude option Tom Grennan
2012-02-22  1:28           ` [PATCHv3 5/5] for-each-ref " Tom Grennan
2012-02-11  2:16     ` [PATCHv2 1/4] refs: add common refname_match_patterns() Tom Grennan
2012-02-11  7:12       ` Michael Haggerty
2012-02-11 19:17         ` Tom Grennan
2012-02-13  5:00           ` Michael Haggerty
2012-02-13 17:27             ` Tom Grennan
2012-02-11  8:06       ` Junio C Hamano
2012-02-11 19:37         ` Tom Grennan
2012-02-11 23:43           ` Junio C Hamano
2012-02-13 16:29             ` Tom Grennan
2012-02-11  2:16     ` [PATCHv2 2/4] tag: use refs.c:refname_match_patterns() Tom Grennan
2012-02-11  2:16     ` [PATCHv2 3/4] branch: " Tom Grennan
2012-02-11  2:16     ` [PATCHv2 4/4] for-each-ref: " Tom Grennan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vaa4meat5.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jasampler@gmail.com \
    --cc=krh@redhat.com \
    --cc=mhagger@alum.mit.edu \
    --cc=pclouds@gmail.com \
    --cc=surfingalbert@gmail.com \
    --cc=tmgrennan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.