All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Michael O'Cleirigh <michael.ocleirigh@rivulet.ca>
Cc: Johannes Sixt <j6t@kdbg.org>, git@vger.kernel.org
Subject: Re: [PATCH] git-filter-branch: add --egrep-filter option
Date: Tue, 19 Apr 2011 03:01:43 -0500	[thread overview]
Message-ID: <20110419080143.GA17915@elie> (raw)
In-Reply-To: <4DAA464E.7010804@rivulet.ca>

Hi,

Michael O'Cleirigh wrote:

> After considering your comment I have to agree with you that it is a
> special case of index-filter and probably not useful/general for
> enough other cases to justify adding in a new command line option.

Now, why do you give up so easily? ;-)

Surely what your patch is hinting at is the possibility of an
--ls-tree-filter (for lack of a better name) that works with trees
without the overhead of unpacking them.  On the other hand I do agree
with Hannes that allowing only "egrep" is a bit overspecialized.

In practice I would have used something like

	--commit-filter='
		tree=$1 &&
		new_tree=$(
			git ls-tree $commit |
			egrep "$filter_egrep" |
			git mktree
		) &&
		shift &&
		git_commit_non_empty_tree "$new_tree" "$@"
	'

so another (simpler?) solution might be an entry for the EXAMPLES
section of the manual along these lines.

Ciao,
Jonathan

  reply	other threads:[~2011-04-19  8:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 22:50 [PATCH] git-filter-branch: add --egrep-filter option Michael O'Cleirigh
2011-04-16  8:16 ` Johannes Sixt
2011-04-17  1:45   ` Michael O'Cleirigh
2011-04-19  8:01     ` Jonathan Nieder [this message]
2011-04-19 16:03       ` Phil Hord

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=20110419080143.GA17915@elie \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=michael.ocleirigh@rivulet.ca \
    /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.