summaryrefslogtreecommitdiff
path: root/src/reflog.h
diff options
context:
space:
mode:
authorschu <schu-github@schulog.org>2011-06-28 14:13:12 +0200
committerVicent Marti <tanoku@gmail.com>2011-07-09 02:40:16 +0200
commit27df4275f2b3301f117f538929f51f0e86f9f716 (patch)
tree0a3eebdec579d67f98be75a2637fa7aabee5ee77 /src/reflog.h
parent6727e30028b66ab0037dc25a268db18484603251 (diff)
downloadlibgit2-27df4275f2b3301f117f538929f51f0e86f9f716.tar.gz
reflog: add API to read or write a reference log
So far libgit2 didn't support reference logs (reflog). Add a new git_reflog_* API for basic reading and writing of reflogs: * git_reflog_read * git_reflog_write * git_reflog_free Signed-off-by: schu <schu-github@schulog.org>
Diffstat (limited to 'src/reflog.h')
-rw-r--r--src/reflog.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/reflog.h b/src/reflog.h
new file mode 100644
index 000000000..da352ca8f
--- /dev/null
+++ b/src/reflog.h
@@ -0,0 +1,26 @@
+#ifndef INCLUDE_reflog_h__
+#define INCLUDE_reflog_h__
+
+#include "common.h"
+#include "git2/reflog.h"
+#include "vector.h"
+
+#define GIT_REFLOG_DIR "logs/"
+
+#define GIT_REFLOG_SIZE_MIN (2*GIT_OID_HEXSZ+2+17)
+
+struct git_reflog_entry {
+ char *oid_old;
+ char *oid_cur;
+
+ git_signature *committer;
+
+ char *msg;
+};
+
+struct git_reflog {
+ char *ref_name;
+ git_vector entries;
+};
+
+#endif /* INCLUDE_reflog_h__ */