diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-07-09 02:37:16 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-07-09 02:40:16 +0200 |
commit | 06c43821b94dcf9fa4f95f29c12f77d18a402690 (patch) | |
tree | 219e1f975109df1989bdcd86611e59ccf1ca403e /src/oid.c | |
parent | afeecf4f262b74270368ef8a70c582ea9d5a18e8 (diff) | |
download | libgit2-06c43821b94dcf9fa4f95f29c12f77d18a402690.tar.gz |
Remove unused methods
The direct-writes commit left some (slow) internals methods that
were no longer needed. These have been removed.
Also, the Reflog code was using the old `git_signature__write`, so
it has been rewritten to use a normal buffer and the new `writebuf`
signature writer. It's now slightly simpler and faster.
Diffstat (limited to 'src/oid.c')
-rw-r--r-- | src/oid.c | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -136,7 +136,7 @@ char *git_oid_to_string(char *out, size_t n, const git_oid *oid) return out; } -int git__parse_oid(git_oid *oid, const char **buffer_out, +int git_oid__parse(git_oid *oid, const char **buffer_out, const char *buffer_end, const char *header) { const size_t sha_len = GIT_OID_HEXSZ; @@ -161,20 +161,6 @@ int git__parse_oid(git_oid *oid, const char **buffer_out, return GIT_SUCCESS; } -int git__write_oid(git_odb_stream *stream, const char *header, const git_oid *oid) -{ - char hex_oid[42]; - - git_oid_fmt(hex_oid + 1, oid); - - hex_oid[0] = ' '; - hex_oid[41] = '\n'; - - stream->write(stream, header, strlen(header)); - stream->write(stream, hex_oid, 42); - return GIT_SUCCESS; -} - void git_oid__writebuf(git_buf *buf, const char *header, const git_oid *oid) { char hex_oid[GIT_OID_HEXSZ]; |