Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-07-09 04:37:16 +0400
committerVicent Marti <tanoku@gmail.com>2011-07-09 04:40:16 +0400
commit06c43821b94dcf9fa4f95f29c12f77d18a402690 (patch)
tree219e1f975109df1989bdcd86611e59ccf1ca403e /src/signature.c
parentafeecf4f262b74270368ef8a70c582ea9d5a18e8 (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.c28
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;