Re: git filter-branch --subdirectory-filter, still a mistery

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Wielemaker
Date: Thursday, August 7, 2008 - 12:13 am

On Wednesday 06 August 2008 15:39:50 you wrote:

Weirdness goes on.  I tried this:

    git filter-branch --tree-filter '/home/jan/nobackup/tmp2/keep 
packages/chr'

where `keep' is a shell-script:

----------------------------------------------------------------
tmp=/home/jan/nobackup/tmp2
dir="$1"

if [ -d "$dir" ]; then
  b=`basename $dir`
  mv "$dir" $tmp/$b
  rm -rf *
  mv $tmp/$b/* .
  mv $tmp/$b/.??* .
  rmdir $tmp/$b
else
  rm -rf *
fi
----------------------------------------------------------------

This kind of works. I.e. I end up (after 3 hours) with a tree that only
contains files from packages/chr. Using qgit it no longer shows the
other files in the `tree' view. Only, it has *all* commits of the
original project, most of which of course do not change this directory,
but now at least their diff is empty. I'd assume there is a command to
remove these (which?)

Space wise this isn't ok.  The original project GIT is 140M, after this
action and a git gc, it is 63M: *much* too big.

Whats more weird: all tags still have the same sha1. I copied using git
clone --no-hardlinks pl chr, deleted all refs/tags from packed-refs and
gave a "git gc --prune", to end up with 1.1 GIGABYTE repository!?

I'm starting to feel a bit stupid that I can't get this done ...

        Clues?  --- Jan

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git filter-branch --subdirectory-filter, still a mistery, Jan Wielemaker, (Wed Aug 6, 6:39 am)
Re: git filter-branch --subdirectory-filter, still a mistery, Jan Wielemaker, (Thu Aug 7, 12:13 am)
[RFH] filter-branch: ancestor detection weirdness, Thomas Rast, (Thu Aug 7, 4:54 pm)
Re: [RFH] filter-branch: ancestor detection weirdness, Johannes Schindelin, (Fri Aug 8, 4:42 am)
Re: [RFH] filter-branch: ancestor detection weirdness, Johannes Schindelin, (Fri Aug 8, 7:39 am)
Re: [RFH] filter-branch: ancestor detection weirdness, Thomas Rast, (Fri Aug 8, 11:37 am)
Re: [RFH] filter-branch: ancestor detection weirdness, Johannes Schindelin, (Fri Aug 8, 5:16 pm)
Re: [TOY PATCH] filter-branch: add option --delete-unchanged, Johannes Schindelin, (Fri Aug 8, 5:35 pm)
Re: [RFH] filter-branch: ancestor detection weirdness, Junio C Hamano, (Fri Aug 8, 6:25 pm)
[PATCH] filter-branch: use --simplify-merges, Thomas Rast, (Sun Aug 10, 7:02 am)
Re: [PATCH] filter-branch: use --simplify-merges, Junio C Hamano, (Mon Aug 11, 6:54 pm)
Re: [PATCH] filter-branch: use --simplify-merges, Junio C Hamano, (Mon Aug 11, 7:13 pm)
Re: [PATCH] filter-branch: use --simplify-merges, Thomas Rast, (Mon Aug 11, 10:47 pm)
Re: [RFH] filter-branch: ancestor detection weirdness, Petr Baudis, (Tue Aug 12, 1:18 am)
Re: [RFH] filter-branch: ancestor detection weirdness, Junio C Hamano, (Tue Aug 12, 11:33 am)
Re: [TOY PATCH] filter-branch: add option --delete-unchanged, Felipe Contreras, (Sun Sep 14, 9:29 am)