git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, pasky@suse.cz, srabbelier@gmail.com
Subject: Re: [PATCH] filter-branch: add git_commit_non_empty_tree and  --prune-empty.
Date: Fri, 31 Oct 2008 23:42:41 +0100	[thread overview]
Message-ID: <20081031224241.GD21799@artemis.corp> (raw)
In-Reply-To: <alpine.DEB.1.00.0810312334480.22125@pacific.mpi-cbg.de.mpi-cbg.de>

[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]

On Fri, Oct 31, 2008 at 10:36:58PM +0000, Johannes Schindelin wrote:
> Hi,
> 
> On Fri, 31 Oct 2008, Pierre Habouzit wrote:
> 
> > git_commit_non_empty_tree is added to the functions that can be run from 
> > commit filters. Its effect is to commit only commits actually touching 
> > the tree and that are not merge points either.
> > 
> > The option --prune-empty is added. It defaults the commit-filter to
> > 'git_commit_non_empty_tree "$@"', and can be used with any other
> > combination of filters, except --commit-hook that must used
> > 'git_commit_non_empty_tree "$@"' where one puts 'git commit-tree "$@"'
> > usually to achieve the same result.
> 
> I think that the example Sverre posted is better.  It might be a bit more 
> to write out, but at least people can adapt it to their needs (as opposed 
> to only skip "empty" commits).
> 
> However, I would _love_ to see your tests being merged with Sverre's patch 
> (of course, the tests should use the described procedure, then).

Well Sverre's example is probably the most efficient way to do the task,
though the thing is right now, what one wants is rarely to "just" skip
empty commits, but to do some modifications that does not leave empty
commits.

IOW not doing a modification _then_ a new one, but both at the same
time. Given how slow filter-branch can be, it's better to do one
transformation instead of two.


Note that I don't think we should apply only my patch and not Sverre's,
his proposal just made me think that this was an itch I wanted to
scratch for a long time, and both probably are complementary.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-10-31 22:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30  0:33 [PATCH] git-filter-branch: Add an example on how to remove empty commits Petr Baudis
2008-10-30  0:39 ` Sam Vilain
2008-10-30  0:56 ` Johannes Schindelin
2008-10-30 13:26 ` Pierre Habouzit
2008-10-30 15:06   ` Deskin Miller
2008-10-30 15:10     ` Pierre Habouzit
2008-10-30 16:18   ` filter-branch enhancements Pierre Habouzit
2008-10-30 16:18     ` [PATCH] make git-filter-branch use parse-options Pierre Habouzit
2008-10-30 16:18       ` [Proof of concept PATCH] implement --prune-empty switch for filter-branch Pierre Habouzit
2008-10-31  8:22       ` [PATCH] make git-filter-branch use parse-options Pierre Habouzit
2008-10-31  9:26   ` [PATCH] filter-branch: add git_commit_non_empty_tree and --prune-empty Pierre Habouzit
2008-10-31 22:36     ` Johannes Schindelin
2008-10-31 22:42       ` Pierre Habouzit [this message]
2008-11-03  4:58     ` Junio C Hamano
2008-11-03  9:27       ` Pierre Habouzit
2008-11-03 15:18         ` Pierre Habouzit
2009-01-09 19:29           ` Jay Soffian
2009-01-11 11:18             ` Pierre Habouzit
2009-01-11 13:35               ` Johannes Schindelin
2009-01-11 14:27                 ` Pierre Habouzit
2009-01-11 14:40                   ` Sverre Rabbelier
2009-01-11 14:55                     ` Pierre Habouzit
2009-01-11 15:08                       ` Sverre Rabbelier
2009-01-11 20:52                   ` Junio C Hamano
2009-01-11 20:55                     ` Johannes Schindelin

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=20081031224241.GD21799@artemis.corp \
    --to=madcoder@debian.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    --cc=srabbelier@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 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).