Commit c57a3494 authored by Johannes Sixt's avatar Johannes Sixt Committed by Junio C Hamano

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: default avatarJohannes Sixt <>
Acked-by: Johannes Schindelin's avatarJohannes Schindelin <>
Signed-off-by: default avatarJunio C Hamano <>
parent d54276f2
......@@ -16,8 +16,12 @@ USAGE="git-filter-branch [-d TEMPDIR] [FILTERS] DESTBRANCH [REV-RANGE]"
# 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"
cat "$workdir/../map/$1"
echo "$1"
# When piped a commit, output a script to set the ident of either
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment