All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
To: git@vger.kernel.org
Subject: Re: Converting from svn to git
Date: Fri, 15 Aug 2008 15:58:11 +0200	[thread overview]
Message-ID: <g8421k$qcs$1@ger.gmane.org> (raw)
In-Reply-To: <e0b44a890808111046q2626defdnab31b0d7b1c4578@mail.gmail.com>

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

  reply	other threads:[~2008-08-15 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-10 13:11 Converting from svn to git David Neu
2008-08-10 13:24 ` Miklos Vajna
2008-08-10 14:54   ` David Neu
2008-08-10 15:32     ` Michael J Gruber
2008-08-10 15:48       ` David Neu
2008-08-11 17:46         ` David Neu
2008-08-15 13:58           ` Michael J Gruber [this message]
2008-08-17  9:11             ` Sam Vilain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='g8421k$qcs$1@ger.gmane.org' \
    --to=michaeljgruber+gmane@fastmail.fm \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.