diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-07-09 04:37:16 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-07-09 04:40:16 +0400 |
commit | 06c43821b94dcf9fa4f95f29c12f77d18a402690 (patch) | |
tree | 219e1f975109df1989bdcd86611e59ccf1ca403e /src/signature.c | |
parent | afeecf4f262b74270368ef8a70c582ea9d5a18e8 (diff) |
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/signature.c')
-rw-r--r-- | src/signature.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/signature.c b/src/signature.c index be9ed1ccb..d7c1b2d3e 100644 --- a/src/signature.c +++ b/src/signature.c @@ -314,34 +314,6 @@ clean_exit: return GIT_SUCCESS; } -int git_signature__write(char **signature, const char *header, const git_signature *sig) -{ - int offset, hours, mins; - char sig_buffer[2048]; - int sig_buffer_len; - char sign; - - offset = sig->when.offset; - sign = (sig->when.offset < 0) ? '-' : '+'; - - if (offset < 0) - offset = -offset; - - hours = offset / 60; - mins = offset % 60; - - sig_buffer_len = snprintf(sig_buffer, sizeof(sig_buffer), - "%s%s <%s> %u %c%02d%02d\n", - header ? header : "", sig->name, sig->email, - (unsigned)sig->when.time, sign, hours, mins); - - if (sig_buffer_len < 0 || (size_t)sig_buffer_len > sizeof(sig_buffer)) - return GIT_ENOMEM; - - *signature = git__strdup(sig_buffer); - return sig_buffer_len; -} - void git_signature__writebuf(git_buf *buf, const char *header, const git_signature *sig) { int offset, hours, mins; |