summaryrefslogtreecommitdiff
path: root/src/commit2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/commit2.c')
-rw-r--r--src/commit2.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/commit2.c b/src/commit2.c
index 42f2ce5..52bcd68 100644
--- a/src/commit2.c
+++ b/src/commit2.c
@@ -108,6 +108,7 @@ usage(void)
printf("\t-c\t\tdump node coverage and execution times\n");
printf("\t-o\t\tdisable partial commit\n");
printf("\t-f\t\tfull iteration over configuration on commit check\n");
+ printf("\t-b\t\tbreak on each priority node (debug mode)\n");
printf("\t-h\t\thelp\n");
}
@@ -123,12 +124,13 @@ main(int argc, char** argv)
boolean test_mode = FALSE;
boolean disable_partial_commit = FALSE;
boolean full_commit_check = FALSE;
+ boolean break_priority = FALSE;
/* this is needed before calling certain glib functions */
g_type_init();
//grab inputs
- while ((ch = getopt(argc, argv, "dpthsecoaf")) != -1) {
+ while ((ch = getopt(argc, argv, "dpthsecoafb")) != -1) {
switch (ch) {
case 'd':
g_debug = TRUE;
@@ -161,6 +163,9 @@ main(int argc, char** argv)
case 'f':
full_commit_check = TRUE;
break;
+ case 'b':
+ break_priority = TRUE;
+ break;
default:
usage();
exit(0);
@@ -241,6 +246,21 @@ main(int argc, char** argv)
}
}
+ if (break_priority) {
+ g_dump_trans = TRUE;
+ g_node_traverse(trans_child_node,
+ G_PRE_ORDER,
+ G_TRAVERSE_ALL,
+ -1,
+ (GNodeTraverseFunc)dump_func,
+ (gpointer)NULL);
+ g_dump_trans = FALSE;
+ fprintf(out_stream,"Press any key to commit...\n");
+
+ // Wait for single character
+ char input = getchar();
+ }
+
//complete() now requires a undisturbed copy of the trans_child_node tree
GNode *comp_cp_node = g_node_copy(trans_child_node);