commit 9ac00e7c623a97610e51860c5a441e2aa5299022
parent d045dad66c4f1fcbec66576aa8b187eba04c79a2
Author: Mohamed Aslan <maslan@sce.carleton.ca>
Date: Fri, 27 Jun 2014 08:51:23 -0400
baseline log should exit if no head was found, instead of printing null
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/cmd-log.c b/cmd-log.c
@@ -35,6 +35,8 @@ cmd_log(int argc, char **argv)
baseline_session_begin(&s, 0);
s.db_ops->branch_get_head(s.db_ctx, s.branch, &head);
+ if (head == NULL)
+ goto ret;
do {
comm = baseline_commit_new();
@@ -50,6 +52,7 @@ cmd_log(int argc, char **argv)
baseline_commit_free(comm);
} while (!done);
+ret:
baseline_session_end(&s);
return EXIT_SUCCESS;
}