git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-filter-branch behavior
@ 2008-08-13 16:14 David Neu
  2008-08-13 20:41 ` Jonathan Nieder
  0 siblings, 1 reply; 4+ messages in thread
From: David Neu @ 2008-08-13 16:14 UTC (permalink / raw)
  To: git

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 &

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-15 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-13 16:14 git-filter-branch behavior David Neu
2008-08-13 20:41 ` Jonathan Nieder
2008-08-13 21:00   ` Jonathan Nieder
2008-08-15 15:32   ` Michael J Gruber

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