summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--file/git-file.c16
2 files changed, 16 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 237b6f7..d573d29 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,7 @@ EEDIFF_OBJS = main/eediff.o main/common.o \
$(OBJS_MISC)
EETEST_OBJS = main/eetest.o main/common.o \
kicad/sexpr.o \
+ kicad/pl-render.o gfx/gfx.o gfx/text.o gfx/misc.o \
gui/fmt-pango.o \
$(OBJS_FILE) \
$(OBJS_MISC)
diff --git a/file/git-file.c b/file/git-file.c
index a03a7a7..1593115 100644
--- a/file/git-file.c
+++ b/file/git-file.c
@@ -547,13 +547,27 @@ static void recurse_time(const git_commit *commit, const git_oid *oid,
}
+#include "kicad/pl.h"
+
+
time_t vcs_git_time(void *ctx)
{
const struct vcs_git *vcs_git = ctx;
const git_oid *oid = git_object_id(vcs_git->obj);
time_t t = 0;
- recurse_time(vcs_git->commit, oid, &t);
+ /*
+ * @@@ Retrieving time from git is rather slow, so we only do it if
+ * there is any chance we'll actually need it.
+ *
+ * What would be better solutions:
+ * - make the search more efficient (e.g., by avoiding searching the
+ * ancestry of merges multiple times),
+ * - cache results,
+ * - lazy evaluation.
+ */
+ if (date_override)
+ recurse_time(vcs_git->commit, oid, &t);
return t;
}