Skip to content

Commit

Permalink
Remove useless use of sed in git-format-patch.
Browse files Browse the repository at this point in the history
There was a leftover use of sed that attempted to remove the commit ID
output from git-diff-tree, which turned into an expensive no-op when
git-diff-tree output header format changed about three months ago.
Drop it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Oct 4, 2005
1 parent f641339 commit b10c1a7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions git-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ whosepatchScript='
q
}'

_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
stripCommitHead='/^'"$_x40"' (from '"$_x40"')$/d'

git-cherry -v "$rev1" "$rev2" |
while read sign rev comment
do
Expand Down Expand Up @@ -216,7 +212,7 @@ Date: '"$ad"
echo
git-diff-tree -p $diff_opts "$commit" | git-apply --stat --summary
echo
git-diff-tree -p $diff_opts "$commit" | sed -e "$stripCommitHead"
git-diff-tree -p $diff_opts "$commit"

case "$mbox" in
t)
Expand Down

0 comments on commit b10c1a7

Please sign in to comment.