Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15

Re: Converting from svn to git

From: Sam Vilain <hidden>
Date: 2016-06-15 22:45:10

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help