filter-branch: Avoid an error message in the map function.
When the map function didn't find the rewritten commit of the passed in original id, it printed the original id, but it still fell through to the 'cat', which failed with an error message. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d54276f207
commit
c57a3494c1
@ -16,8 +16,12 @@ USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] DESTBRANCH [REV-RANGE]"
|
||||
map()
|
||||
{
|
||||
# if it was not rewritten, take the original
|
||||
test -r "$workdir/../map/$1" || echo "$1"
|
||||
cat "$workdir/../map/$1"
|
||||
if test -r "$workdir/../map/$1"
|
||||
then
|
||||
cat "$workdir/../map/$1"
|
||||
else
|
||||
echo "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
# When piped a commit, output a script to set the ident of either
|
||||
|
Loading…
Reference in New Issue
Block a user