Refactor replace_encoding_header.
commita08f23ab3eab67aac7163a284038f45fa99ef66f
authorPierre Habouzit <madcoder@debian.org>
Sat, 15 Sep 2007 21:50:12 +0000 (15 23:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2007 00:30:04 +0000 (16 17:30 -0700)
tree7fc41ff6fe9b4dfa25cd815eb22d1c54cb28f6d7
parentc7f9cb14286fff23bfe65033d4ec63f84c77f554
Refactor replace_encoding_header.

* Be more clever in how we search for "encoding ...\n": parse for real
  instead of the sloppy strstr's.
* use strbuf_splice to do the substring replacements.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c