git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Neu" <david@davidneu.com>
To: git@vger.kernel.org
Subject: git-filter-branch behavior
Date: Wed, 13 Aug 2008 12:14:20 -0400	[thread overview]
Message-ID: <e0b44a890808130914oced739cy2aaf54aebfcfcbce@mail.gmail.com> (raw)

All,

Running

git-filter-branch --tree-filter 'rm -rf subdir/' -- --all

as shown below seems to leave empty commits
corresponding to subdir/ in the tree.  Is this the expected
behavior?  If so is there a command to remove the empty
commits?  Using git-rebase -i to edit the commit history
works, but is a bit tedious on a large tree.

Many thanks!

Cheers,
David

***** ***** ***** ***** *****

mkdir test-filter-branch
cd test-filter-branch

echo 'base1' > base.txt
mkdir subdir
echo 'sub1' > subdir/sub.txt
git-init
git-add .
git-commit -a -m "Commit 1"

echo 'base2' >> base.txt
git-commit -a -m "Commit 2"

echo 'sub3' > subdir/sub.txt
git-commit -a -m "Commit 3"

echo 'base4' >> base.txt
echo 'sub4' > subdir/sub.txt
git-commit -a -m "Commit 4"

git-filter-branch --tree-filter 'rm -rf subdir/' -- --all

gitk &

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13 16:14 David Neu [this message]
2008-08-13 20:41 ` git-filter-branch behavior Jonathan Nieder
2008-08-13 21:00   ` Jonathan Nieder
2008-08-15 15:32   ` Michael J Gruber

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=e0b44a890808130914oced739cy2aaf54aebfcfcbce@mail.gmail.com \
    --to=david@davidneu.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).