1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-19 09:27:30 +02:00
eda-tools/eeshow/git-hist.h

44 lines
1.0 KiB
C
Raw Normal View History

/*
* git-hist.h - Retrieve revision history from GIT repo
*
* Written 2016 by Werner Almesberger
* Copyright 2016 by Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef GIT_HIST_H
#define GIT_HIST_H
#include <stdbool.h>
#include <git2.h>
struct hist {
struct git_commit *commit; /* NULL if uncommitted changes */
unsigned branch; /* branch index */
struct hist **newer;
unsigned n_newer;
struct hist **older;
unsigned n_older;
};
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);
char *vcs_git_long_for_pango(struct hist *hist);
void hist_iterate(struct hist *h,
void (*fn)(void *user, struct hist *h), void *user);
void dump_hist(struct hist *h);
#endif /* !GIT_HIST_H */