mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2025-04-21 12:27:27 +03:00
eeshow/git-hist.c (vcs_git_get_rev), git-hist.h: revision string from history
This commit is contained in:
@@ -187,6 +187,15 @@ struct hist *vcs_git_hist(const char *path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
char *vcs_git_get_rev(struct hist *h)
|
||||||
|
{
|
||||||
|
const git_oid *oid = git_commit_id(h->commit);
|
||||||
|
char *s = alloc_size(GIT_OID_HEXSZ + 1);
|
||||||
|
|
||||||
|
return git_oid_tostr(s, GIT_OID_HEXSZ + 1, oid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const char *vcs_git_summary(struct hist *h)
|
const char *vcs_git_summary(struct hist *h)
|
||||||
{
|
{
|
||||||
const char *summary;
|
const char *summary;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ struct hist {
|
|||||||
|
|
||||||
bool vcs_git_try(const char *path);
|
bool vcs_git_try(const char *path);
|
||||||
struct hist *vcs_git_hist(const char *path);
|
struct hist *vcs_git_hist(const char *path);
|
||||||
|
char *vcs_git_get_rev(struct hist *h);
|
||||||
const char *vcs_git_summary(struct hist *hist);
|
const char *vcs_git_summary(struct hist *hist);
|
||||||
void hist_iterate(struct hist *h,
|
void hist_iterate(struct hist *h,
|
||||||
void (*fn)(void *user, struct hist *h), void *user);
|
void (*fn)(void *user, struct hist *h), void *user);
|
||||||
|
|||||||
Reference in New Issue
Block a user