git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: git@vger.kernel.org
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>,
	Ilari Liusvaara <ilari.liusvaara@elisanet.fi>,
	Pierre Habouzit <madcoder@madism.org>
Subject: [PATCH/RFC 0/3] teaching log's --glob=<glob> and friends to git shortlog
Date: Thu, 21 Apr 2011 05:22:41 -0500	[thread overview]
Message-ID: <20110421102241.GA16185@elie> (raw)

Hi,

While looking over the setup_revisions code to work on an interesting
request from Josh Triplett[1] (that happens to coincide with a
longstanding wish of my own), I got distracted by a few things.  The
nominal subject of this series is to teach "git shortlog" to handle
commands like

	git shortlog --glob=remotes/charon/notes/*

Patch 1 makes the code clearer about something I had been confused
by for a long time --- the --no-walk option invented for "git show"'s
benefit has global effect.  So tricks like[2]

	git rev-list ^HEAD --no-walk commit1 commit2 ...

to list branches not contained in HEAD will not work, alas.

Patch 2 unindents the code a little.

Patch 3 is the title piece --- it adds --glob=, --tag=, and so forth
to the whitelist in handle_revision_opt so commands like "git
shortlog" that parse revision listing options in two stages will queue
them correctly.

While working on this I was struck by how close the setup_revisions
code has been to parseoptification all these years.  Maybe some
weekend.

Thoughts and improvements welcome, of course.

Jonathan Nieder (3):
  revisions: clarify handling of --no-walk and --do-walk
  revisions: split out handle_revision_pseudo_opt function
  revisions: allow --glob and friends in parse_options-enabled commands

 revision.c               |  138 ++++++++++++++++++++++++----------------------
 t/t6018-rev-list-glob.sh |   50 +++++++++++++++++
 2 files changed, 122 insertions(+), 66 deletions(-)

[1] http://bugs.debian.org/621601
[2] http://thread.gmane.org/gmane.comp.version-control.git/138109/focus=138124

             reply	other threads:[~2011-04-21 10:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21 10:22 Jonathan Nieder [this message]
2011-04-21 10:39 ` [WRONG/PATCH 1/3] revisions: clarify handling of --no-walk and --do-walk Jonathan Nieder
2011-04-21 13:03   ` Michael J Gruber
2011-04-21 21:30     ` Jonathan Nieder
2011-04-24 11:28       ` Michael J Gruber
2011-04-25  0:21         ` Jonathan Nieder
2011-04-26  8:19           ` Michael J Gruber
2011-04-21 10:45 ` [PATCH 2/3] revisions: split out handle_revision_pseudo_opt function Jonathan Nieder
2011-04-21 10:48 ` [PATCH 3/3] revisions: allow --glob and friends in parse_options-enabled commands Jonathan Nieder
2011-04-21 17:40 ` [PATCH/RFC 0/3] teaching log's --glob=<glob> and friends to git shortlog Junio C Hamano
2011-04-21 21:16   ` Jonathan Nieder

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=20110421102241.GA16185@elie \
    --to=jrnieder@gmail.com \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=ilari.liusvaara@elisanet.fi \
    --cc=madcoder@madism.org \
    /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).