From: Seija Kijin <doremylover123@xxxxxxxxx> S_ISDIR is a macro that involves a "==" comparison. This means the !! is redundant and not needed. Signed-off-by: Seija Kijin <doremylover123@xxxxxxxxx> --- Remove redundant double exclamation points S_ISDIR is a macro that involves a "==" comparison. This means the !! is redundant and not needed. Signed-off-by: Seija Kijin doremylover123@xxxxxxxxx Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1401%2FAtariDreams%2FIS_DIR-v1 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1401/AtariDreams/IS_DIR-v1 Pull-Request: https://github.com/git/git/pull/1401 tree-walk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tree-walk.c b/tree-walk.c index 74f4d710e8f..6b51d27ccb2 100644 --- a/tree-walk.c +++ b/tree-walk.c @@ -1040,9 +1040,9 @@ static enum interesting do_match(struct index_state *istate, ps->max_depth == -1) return all_entries_interesting; return within_depth(base->buf + base_offset, baselen, - !!S_ISDIR(entry->mode), - ps->max_depth) ? - entry_interesting : entry_not_interesting; + S_ISDIR(entry->mode), ps->max_depth) ? + entry_interesting : + entry_not_interesting; } pathlen = tree_entry_len(entry); @@ -1073,8 +1073,7 @@ static enum interesting do_match(struct index_state *istate, if (within_depth(base_str + matchlen + 1, baselen - matchlen - 1, - !!S_ISDIR(entry->mode), - ps->max_depth)) + S_ISDIR(entry->mode), ps->max_depth)) goto interesting; else return entry_not_interesting; base-commit: 7c2ef319c52c4997256f5807564523dfd4acdfc7 -- gitgitgadget