git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Elazar Leibovich <elazarl@gmail.com>,
	Tim Mazid <timmazid@hotmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Supporting "-v" option for git-log
Date: Wed, 25 May 2011 11:11:15 -0400	[thread overview]
Message-ID: <20110525151115.GB8795@sigill.intra.peff.net> (raw)
In-Reply-To: <m3boyqzy3f.fsf@localhost.localdomain>

On Wed, May 25, 2011 at 06:53:31AM -0700, Jakub Narebski wrote:

> > Which is a shame, because we already have all of the code for "--and",
> > "--or", and "--not" in git-grep. It is just a syntactic conflict. I
> > think you could get away with "--grep-and", "--grep-or", and
> > "--grep-not". They are obviously less nice to type, but there would be
> > not conflict.
> 
> Hmmm... perhaps short -! could be alias for --grep-not (it is the only
> that needs to be changed to avoid conflict, as there are no --or and
> --and for rev-list).

Ick. I really hate using shell metacharacters that need quoting
(especially "!", which even gets expanded inside double-quotes). But as
long as it's an alias, I guess people who care can use --grep-not.

We could use unadorned "--or" and "--and", though we should perhaps stop
and think whether taking those basic operators will block future use
that matches the current "--not" more.

Right now, "git log a b" is what I would expect "git log a --or b" to
do. I guess "git log a --and b" would be "git log $(git merge-base a
b)". So maybe it is not worth reserving them for the future, since what
they would (probably) accomplish is easy to do now.

-Peff

  reply	other threads:[~2011-05-25 15:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25  9:40 Supporting "-v" option for git-log Elazar Leibovich
2011-05-25 11:05 ` Tim Mazid
2011-05-25 11:14   ` Elazar Leibovich
2011-05-25 11:21     ` Tim Mazid
2011-05-25 11:24       ` Tim Mazid
2011-05-25 11:28       ` Elazar Leibovich
2011-05-25 11:35         ` Tim Mazid
2011-05-25 11:40           ` Elazar Leibovich
2011-05-25 13:29         ` Jeff King
2011-05-25 13:53           ` Jakub Narebski
2011-05-25 15:11             ` Jeff King [this message]
2011-05-25 16:38               ` Jakub Narebski
2011-05-25 17:32           ` Junio C Hamano
2011-05-25 20:01             ` Jeff King

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=20110525151115.GB8795@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=elazarl@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=timmazid@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).