author | Pierre Habouzit <madcoder@debian.org> | |
Wed, 19 Sep 2007 22:42:12 +0000 (00:42 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Sep 2007 06:17:40 +0000 (23:17 -0700) | ||
commit | c76689df6c64a1e987bd779bd71a2042b5131fb9 | |
tree | 22f810d6b67ed4bd03bfafb244eb9e6012502476 | tree | snapshot |
parent | 19247e5510279f018f8358a72b38cc5aa62fac8a | commit | diff |
strbuf API additions and enhancements.
Add strbuf_remove, change strbuf_insert:
As both are special cases of strbuf_splice, implement them as such.
gcc is able to do the math and generate almost optimal code this way.
Add strbuf_swap:
Exchange the values of its arguments.
Use it in fast-import.c
Also fix spacing issues in strbuf.h
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Add strbuf_remove, change strbuf_insert:
As both are special cases of strbuf_splice, implement them as such.
gcc is able to do the math and generate almost optimal code this way.
Add strbuf_swap:
Exchange the values of its arguments.
Use it in fast-import.c
Also fix spacing issues in strbuf.h
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
commit.c | diff | blob | history | |
fast-import.c | diff | blob | history | |
strbuf.c | diff | blob | history | |
strbuf.h | diff | blob | history |