[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH] filter-branch: add git_commit_non_empty_tree and  --prune-empty.
From:       Pierre Habouzit <madcoder () debian ! org>
Date:       2008-10-31 22:42:41
Message-ID: 20081031224241.GD21799 () artemis ! corp
[Download RAW message or body]

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 #3 (application/pgp-signature)]
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic