Hi folks,
now finally managed the index-filter part.
The main problem, IIRC, was that git-update-index didn't
automatically create an empty index, so I needed to explicitly
copy in (manually created it with an empty repo).
My current filter code is:
if [ ! "$GIT_AUTHOR_EMAIL" ] && [ ! "$GIT_COMMITTER_EMAIL" ]; then
export GIT_AUTHOR_EMAIL="[email protected]"
export GIT_COMMITTER_NAME="[email protected]"
elif [ ! "$GIT_AUTHOR_EMAIL" ]; then
export GIT_AUTHOR_EMAIL="$GIT_COMMITTER_EMAIL"
elif [ ! "$GIT_COMITTER_EMAIL" ]; then
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_NAME"
fi
if [ ! "$GIT_AUTHOR_NAME" ] && [ ! "$GIT_COMMITTER_NAME" ]; then
export GIT_AUTHOR_NAME="[email protected]"
export GIT_COMMITTER_NAME="[email protected]"
elif [ ! "$GIT_AUTHOR_NAME" ]; then
export GIT_AUTHOR_NAME="$GIT_COMMITTER_NAME"
elif [ ! "$GIT_COMITTER_NAME" ]; then
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
fi
cp ../../../../scripts/index.empty $GIT_INDEX_FILE.new
git ls-files -s |
sed "s-\t\"*-&addons/-" |
grep -e "\t*addons/$module" |
( export GIT_INDEX_FILE=$GIT_INDEX_FILE.new ; git update-index --index-info
)
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE
Now another problem: this leaves behind thousands of now empty
merge nodes (--prune-empty doesnt seem to catch them all),
so I loop through additional `git filter-branch --prune-empty`
runs, until the ref remains unchanged.
This process is even more time-consuming, as it takes really many
passes (havent counted them yet).
Does anyone have an idea, why a single run doesnt catch that all?
cu
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html