filter-branch: fix dirty way to provide the helpers to commit filters
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Wed, 28 Nov 2007 15:50:38 +0000 (15:50 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Nov 2007 23:19:35 +0000 (15:19 -0800)
commit16ed34ad35d9a991a72b2db420ff95bc260990cc
tree12eee4ad26c206c18fcd3deaa2766fa1b9118131
parentaa4f31d5a3923939bf2cb670ecaa4f68025f4bf3
filter-branch: fix dirty way to provide the helpers to commit filters

The helper functions 'map' and 'skip_commit' were provided to commit
filters by sourcing filter-branch itself.  This was done with a certain
environment variable set to indicate that only the functions should be
defined, and the script should return then.

This was really hacky, and it did not work all that well, since the
full path to git-filter-branch was not known at all times.

Avoid that by putting the functions into a variable, and eval'ing
that variable.  The commit filter gets these functions by prepending
the variable to the specified commands.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-filter-branch.sh