author | Marco Costalba <mcostalba@gmail.com> | |
Sun, 22 Jul 2007 08:23:05 +0000 (10:23 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 22 Jul 2007 08:40:21 +0000 (01:40 -0700) | ||
commit | c4640fe8d9e25fd3e206a39233c71a6dbb68917e | |
tree | 5ef0602a6f3405f89f769f55017dac4df25a55b5 | tree | snapshot |
parent | e5633cbb8577b430f175f62cf4e7ed53f2434a89 | commit | diff |
Avoid to duplicate commit message when is not encoded
When a commit message doesn't have encoding information
and encoding output is utf-8 (default) then an useless
xstrdup() of commit message is done.
If we assume most of users live in an utf-8 world, this
useless copy is the common case.
Performance issue found with KCachegrind.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When a commit message doesn't have encoding information
and encoding output is utf-8 (default) then an useless
xstrdup() of commit message is done.
If we assume most of users live in an utf-8 world, this
useless copy is the common case.
Performance issue found with KCachegrind.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit.c | diff | blob | history |