mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-03 00:25:09 +00:00
String mememory is now managed in a much more sane manner. Fixes include: - git_person email and name is no longer limited to 64 characters - git_tree_entry filename is no longer limited to 255 characters - raw objects are properly opened & closed the minimum amount of times required for parsing - unit tests no longer leak - removed 5 other misc memory leaks as reported by Valgrind - tree writeback no longer segfaults on rare ocassions The git_person struct is no longer public. It is now managed by the library, and getter methods are in place to access its internal attributes. Signed-off-by: Vicent Marti <tanoku@gmail.com>
21 lines
645 B
C
21 lines
645 B
C
#ifndef INCLUDE_person_h__
|
|
#define INCLUDE_person_h__
|
|
|
|
#include "git/common.h"
|
|
#include "repository.h"
|
|
#include <time.h>
|
|
|
|
/** Parsed representation of a person */
|
|
struct git_person {
|
|
char *name; /**< Full name */
|
|
char *email; /**< Email address */
|
|
time_t time; /**< Time when this person committed the change */
|
|
};
|
|
|
|
void git_person__free(git_person *person);
|
|
git_person *git_person__new(const char *name, const char *email, time_t time);
|
|
int git_person__parse(git_person *person, char **buffer_out, const char *buffer_end, const char *header);
|
|
int git_person__write(git_odb_source *src, const char *header, const git_person *person);
|
|
|
|
#endif
|