author | Pierre Habouzit <madcoder@debian.org> | |
Wed, 19 Sep 2007 22:42:14 +0000 (00:42 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Sep 2007 06:32:18 +0000 (23:32 -0700) | ||
commit | 7fb1011e610a28518959b1d2d48cea17ecc32048 | |
tree | 2f07cfdbd6e14dd3e98e1325c7f30c325ea4c785 | tree | snapshot |
parent | c76689df6c64a1e987bd779bd71a2042b5131fb9 | commit | diff |
Rework unquote_c_style to work on a strbuf.
If the gain is not obvious in the diffstat, the resulting code is more
readable, _and_ in checkout-index/update-index we now reuse the same buffer
to unquote strings instead of always freeing/mallocing.
This also is more coherent with the next patch that reworks quoting
functions.
The quoting function is also made more efficient scanning for backslashes
and treating portions of strings without a backslash at once.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
If the gain is not obvious in the diffstat, the resulting code is more
readable, _and_ in checkout-index/update-index we now reuse the same buffer
to unquote strings instead of always freeing/mallocing.
This also is more coherent with the next patch that reworks quoting
functions.
The quoting function is also made more efficient scanning for backslashes
and treating portions of strings without a backslash at once.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
builtin-apply.c | diff | blob | history | |
builtin-checkout-index.c | diff | blob | history | |
builtin-update-index.c | diff | blob | history | |
fast-import.c | diff | blob | history | |
mktree.c | diff | blob | history | |
quote.c | diff | blob | history | |
quote.h | diff | blob | history |