Subject: Re: Converting from svn to git

From: Sam Vilain <[email-masked]>
Date: Sun, 17 Aug 2008 21:11:58 +1200

On Fri, 2008-08-15 at 15:58 +0200, Michael J Gruber wrote:
> A while ago I "complained" that rebase would skip empty commits. You 
> might experiment with that. Alternatively, the following works for me:
> 
> git filter-branch --commit-filter 'cmd="git commit-tree"; test `git show 
> --pretty=oneline $GIT_COMMIT|wc -l` = 1 && cmd="skip_commit"; $cmd "$@"' 
> -- --all
> 
> This skips all commits which introduce no diff. It will not remove 
> branches or tags which are related only to those subdirs.
> 
> I am sure there will be more elegant ways to do that (esp. the test with 
> wc).

something like this should work:

  --commit-filter 'if [ "$1" = `git rev-parse HEAD^{tree}` ]; then
skip_commit "$@"; else git commit-tree "$@"; fi'

Sam.