diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-07 11:10:58 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-07 11:24:37 +0200 |
commit | 740b161bfaddbd236c9d052546f27dd4af30582c (patch) | |
tree | 6635a86cf206f4111dcceb0f46c34691ccaf3ca3 /difftool/node_compare.c | |
parent | 55914564db1ce7a4fc71e9dc34156aa144661d0d (diff) |
Add flag to difftool to also compare time stamps
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool/node_compare.c')
-rw-r--r-- | difftool/node_compare.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/difftool/node_compare.c b/difftool/node_compare.c index fae35ab..e1b72c6 100644 --- a/difftool/node_compare.c +++ b/difftool/node_compare.c @@ -36,6 +36,13 @@ int node_compare(tree_node_t *a, tree_node_t *b) } } + if (compare_flags & COMPARE_TIMESTAMP) { + if (a->mod_time != b->mod_time) { + fprintf(stdout, "%s has a different timestamp\n", path); + status = 1; + } + } + switch (a->mode & S_IFMT) { case S_IFSOCK: case S_IFIFO: |