1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-22 15:32:47 +02:00

eeshow/: properly handle fake history record for uncommitted changes

This commit is contained in:
Werner Almesberger 2016-08-11 03:24:34 -03:00
parent 2ef7eab861
commit 5a2324169e
2 changed files with 3 additions and 1 deletions

View File

@ -229,6 +229,8 @@ char *vcs_git_long_for_pango(struct hist *h)
const git_signature *sig;
char *s;
if (!h->commit)
return stralloc("Uncommitted changes");
if (git_object_short_id(&buf, (git_object *) h->commit))
goto fail;
commit_time = git_commit_time(h->commit);

View File

@ -1148,7 +1148,7 @@ static const struct sheet *parse_files(struct gui_hist *hist,
bool libs_cached = 0;
bool ok;
if (hist->vcs_hist)
if (hist->vcs_hist && hist->vcs_hist->commit)
rev = vcs_git_get_rev(hist->vcs_hist);
sch_init(&hist->sch_ctx, recurse);