Re: [PATCH] filter-branch: add git_commit_non_empty_tree and --prune-empty.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 31, 2008, 22:36 UTC
- Message-ID
- <alpine.DEB.1.00.0810312334480.22125@pacific.mpi-cbg.de.mpi-cbg.de>
- In-Reply-To
- <1225445204-28000-1-git-send-email-madcoder@debian.org>
Hi,
On Fri, 31 Oct 2008, Pierre Habouzit wrote:
Show 9 quoted lines
> 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).
Ciao, Dscho