mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-29 20:53:55 +02:00
eeshow/git-hist.c (vcs_git_get_rev), git-hist.h: revision string from history
This commit is contained in:
parent
a58bc93d69
commit
8fb867105c
@ -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 *summary;
|
||||
|
@ -33,6 +33,7 @@ struct hist {
|
||||
|
||||
bool vcs_git_try(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);
|
||||
void hist_iterate(struct hist *h,
|
||||
void (*fn)(void *user, struct hist *h), void *user);
|
||||
|
Loading…
Reference in New Issue
Block a user