Re: Converting from svn to git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Neu venit, vidit, dixit 11.08.2008 19:46:
OK, I did

$ git-filter-branch --tree-filter 'rm -rf subdir1/ subdir2/ subdir3/' -- --all

which looks good, except when I open gitk, I still see "empty" commits
that correspond to subdir1/, subdir2/ and subdir3/.

Is there anyway to remove those?

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).

Michael

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux