Merge branch 'me/fetch-into-shallow-safety' into maint
[gitweb.git] / git-filter-branch.sh
index e6e99f5bb5102d394a25f156dbcba956f246054b..5b3f63d8bbc65e80d1f4278e1ec6e27df604dc9a 100755 (executable)
@@ -346,7 +346,15 @@ while read commit parents; do
                                die "parent filter failed: $filter_parent"
        fi
 
-       sed -e '1,/^$/d' <../commit | \
+       {
+               while read -r header_line && test -n "$header_line"
+               do
+                       # skip header lines...
+                       :;
+               done
+               # and output the actual commit message
+               cat
+       } <../commit |
                eval "$filter_msg" > ../message ||
                        die "msg filter failed: $filter_msg"
        workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \