diff options
-rw-r--r-- | src/commit2.c | 6 | ||||
-rw-r--r-- | src/common/defs.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/commit2.c b/src/commit2.c index 871c085..4c0c342 100644 --- a/src/commit2.c +++ b/src/commit2.c @@ -334,13 +334,19 @@ process_func(GNode *node, gpointer data) fprintf(out_stream,"[START] %lu, %s@%s",(unsigned long)t.tv_sec,ActionNames[result->_action],d->_path); } + if (result->_action == delete_act) { + setenv(ENV_ACTION_NAME,ENV_ACTION_DELETE,1); set_in_delete_action(TRUE); } + else { + setenv(ENV_ACTION_NAME,ENV_ACTION_SET,1); + } status = execute_list(c->_def.actions[result->_action].vtw_list_head,&c->_def); if (result->_action == delete_act) { set_in_delete_action(FALSE); } + unsetenv(ENV_ACTION_NAME); if (g_coverage) { struct timeval t; diff --git a/src/common/defs.h b/src/common/defs.h index b489919..a26bfbc 100644 --- a/src/common/defs.h +++ b/src/common/defs.h @@ -11,6 +11,11 @@ #define MAX_DEPTH 128 +#define ENV_ACTION_NAME "COMMIT_ACTION" +#define ENV_ACTION_DELETE "DELETE" +#define ENV_ACTION_SET "SET" + + struct Result { int _err_code; |