travis: run tests with GIT_TEST_SPLIT_INDEX
[gitweb.git] / builtin / commit.c
index 11c47401854fa4bfd8b75429f053882ff1c61551..be370f64a995804ec6b62e03f7c6940044e08e24 100644 (file)
@@ -1492,6 +1492,8 @@ static void print_summary(const char *prefix, const struct object_id *oid,
        diff_setup_done(&rev.diffopt);
 
        head = resolve_ref_unsafe("HEAD", 0, NULL, NULL);
+       if (!head)
+               die_errno(_("unable to resolve HEAD after creating commit"));
        if (!strcmp(head, "HEAD"))
                head = _("detached HEAD");
        else