summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d54276f)
raw | patch | inline | side by side (parent: d54276f)
author | Johannes Sixt <J.Sixt@eudaptics.com> | |
Wed, 4 Jul 2007 12:08:17 +0000 (14:08 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 Jul 2007 19:41:10 +0000 (12:41 -0700) |
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>
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>
git-filter-branch.sh | patch | blob | history |
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 22fb5bf6ad929e2028ec1cf98f9073b14cdd8b51..5fa9b61740c6bec1c50f0a72150d6b1405ebd65b 100644 (file)
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
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