tests: fix negated test_i18ngrep calls

The helper function test_i18ngrep pretends that it found the expected
results when it is running under GETTEXT_POISON. For this reason, it must
not be used negated like so

   ! test_i18ngrep foo bar

because the test case would fail under GETTEXT_POISON. The function offers
a special syntax to test that a pattern is *not* found:

   test_i18ngrep ! foo bar

Convert incorrect uses to this syntax.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Git 2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
log_ref_write: use strbuf instead of hand-rolled malloc

Besides being fewer lines of code, a strbuf helps in a few
ways:

  1. It makes it much more obvious that the combination of
     malloc with a magic "100" followed by "sprintf" is not
     a buffer overflow (it is not currently, because that
     100 is accounting for 2 sha1s and some whitespace, but
     it takes some careful reading to realize it).

  2. It makes it easier to write the logic of what is
     getting formatted. For example, in the existing code,
     we write a newline after the committer, and then
     sometimes overwrite that newline with the reflog
     message, only to add another newline. This is much
     easier written by adding the newline afterwards.

  3. It makes future patches to tweak the format much
     easier.
log_ref_write: optionally write refname into log

The usual reflog format does not contain the ref name, since
it is implicit in the location of the log. However, ...
read and write everything log