summaryrefslogtreecommitdiff
path: root/test-revision-walking.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-revision-walking.c')
-rw-r--r--test-revision-walking.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test-revision-walking.c b/test-revision-walking.c
index 3ade02c72d..3d0313354b 100644
--- a/test-revision-walking.c
+++ b/test-revision-walking.c
@@ -17,7 +17,7 @@ static void print_commit(struct commit *commit)
{
struct strbuf sb = STRBUF_INIT;
struct pretty_print_context ctx = {0};
- ctx.date_mode = DATE_NORMAL;
+ ctx.date_mode.type = DATE_NORMAL;
format_commit_message(commit, " %m %s", &sb, &ctx);
printf("%s\n", sb.buf);
strbuf_release(&sb);
@@ -50,6 +50,8 @@ int main(int argc, char **argv)
if (argc < 2)
return 1;
+ setup_git_directory();
+
if (!strcmp(argv[1], "run-twice")) {
printf("1st\n");
if (!run_revision_walk())