diff options
-rw-r--r-- | src/commit2.c | 11 | ||||
-rw-r--r-- | src/common/defs.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/commit2.c b/src/commit2.c index 70e0e99..6229221 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -377,6 +377,16 @@ process_func(GNode *node, gpointer data) set_in_delete_action(TRUE); } + //do last sibling check + GNode *n = g_node_last_sibling(node); + if (n == node) { + setenv(ENV_SIBLING_POSITION,"LAST",1); + } + n = g_node_first_sibling(node); + if (n == node) { + setenv(ENV_SIBLING_POSITION,"FIRST",1); + } + //do not set for promoted actions if (!IS_ACTIVE(d->_operation)) { if (IS_DELETE(d->_operation)) { @@ -408,6 +418,7 @@ process_func(GNode *node, gpointer data) } unsetenv(ENV_ACTION_NAME); + unsetenv(ENV_SIBLING_POSITION); if (g_coverage) { struct timeval t; diff --git a/src/common/defs.h b/src/common/defs.h index 5e110bc..f8171e4 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -15,6 +15,8 @@ #define ENV_ACTION_DELETE "DELETE" #define ENV_ACTION_SET "SET" #define ENV_ACTION_ACTIVE "ACTIVE" +#define ENV_SIBLING_POSITION "COMMIT_SIBLING_POSITION" + struct Result { |