summaryrefslogtreecommitdiff
path: root/file
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-29 01:58:14 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-08-29 01:58:14 (GMT)
commit545ecf392a5da2ee9a929d3fc9eca5bd33e3a056 (patch)
treea6b502613ccd1bed3769e8bc44592e8aab115b06 /file
parentd6df803b702a3a6e42cd1368f38e284cf9c9d071 (diff)
downloadeeshow-545ecf392a5da2ee9a929d3fc9eca5bd33e3a056.zip
eeshow-545ecf392a5da2ee9a929d3fc9eca5bd33e3a056.tar.gz
eeshow-545ecf392a5da2ee9a929d3fc9eca5bd33e3a056.tar.bz2
file/git-hist.c: give also "dirty" the full treatment, with threads
Diffstat (limited to 'file')
-rw-r--r--file/git-hist.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/file/git-hist.c b/file/git-hist.c
index c91d816..7fa3c81 100644
--- a/file/git-hist.c
+++ b/file/git-hist.c
@@ -669,18 +669,11 @@ static void dump_one(void *user, struct vcs_hist *h)
struct vcs_history *history = user;
git_buf buf = { 0 };
enum thread *t;
- unsigned n, i, j;
+ unsigned n = threads_number(history);
+ unsigned i, j;
const struct vcs_hist *next;
bool before, here, after;
- if (!h->commit) {
- printf("dirty\n");
- return;
- }
-
- if (git_object_short_id(&buf, (git_object *) h->commit))
- pfatal_git("git_object_short_id");
-
next = NULL;
if (history->n_hist)
for (i = 0; i != history->n_hist - 1; i++)
@@ -694,7 +687,6 @@ for (i = 0; i != h->n_threads; i++)
fprintf(stderr, " %p", h->threads[i]);
fprintf(stderr, " (%p)\n", next);
#endif
- n = threads_number(history);
t = threads_classify(history, h, next);
#ifdef DUMP
for (i = 0; i != n; i++)
@@ -734,6 +726,14 @@ fprintf(stderr, "\n");
}
free(t);
+ if (!h->commit) {
+ printf(" dirty\n");
+ return;
+ }
+
+ if (git_object_short_id(&buf, (git_object *) h->commit))
+ pfatal_git("git_object_short_id");
+
printf(" %s ", buf.ptr);
git_buf_free(&buf);