|
Packit |
ae9e2a |
/*
|
|
Packit |
ae9e2a |
* Copyright (C) the libgit2 contributors. All rights reserved.
|
|
Packit |
ae9e2a |
*
|
|
Packit |
ae9e2a |
* This file is part of libgit2, distributed under the GNU GPL v2 with
|
|
Packit |
ae9e2a |
* a Linking Exception. For full terms see the included COPYING file.
|
|
Packit |
ae9e2a |
*/
|
|
Packit |
ae9e2a |
#ifndef INCLUDE_reflog_h__
|
|
Packit |
ae9e2a |
#define INCLUDE_reflog_h__
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
#include "common.h"
|
|
Packit |
ae9e2a |
#include "git2/reflog.h"
|
|
Packit |
ae9e2a |
#include "vector.h"
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
#define GIT_REFLOG_DIR "logs/"
|
|
Packit |
ae9e2a |
#define GIT_REFLOG_DIR_MODE 0777
|
|
Packit |
ae9e2a |
#define GIT_REFLOG_FILE_MODE 0666
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
#define GIT_REFLOG_SIZE_MIN (2*GIT_OID_HEXSZ+2+17)
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
struct git_reflog_entry {
|
|
Packit |
ae9e2a |
git_oid oid_old;
|
|
Packit |
ae9e2a |
git_oid oid_cur;
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
git_signature *committer;
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
char *msg;
|
|
Packit |
ae9e2a |
};
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
struct git_reflog {
|
|
Packit |
ae9e2a |
git_refdb *db;
|
|
Packit |
ae9e2a |
char *ref_name;
|
|
Packit |
ae9e2a |
git_vector entries;
|
|
Packit |
ae9e2a |
};
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
GIT_INLINE(size_t) reflog_inverse_index(size_t idx, size_t total)
|
|
Packit |
ae9e2a |
{
|
|
Packit |
ae9e2a |
return (total - 1) - idx;
|
|
Packit |
ae9e2a |
}
|
|
Packit |
ae9e2a |
|
|
Packit |
ae9e2a |
#endif /* INCLUDE_reflog_h__ */
|