Andrei Dinu <mandrei.d...@gmail.com> writes:

> ---
>  I try to find other sites that can use id_dot_or_dotdot() function.

This should also have been sent in the same series.

> @@ -171,10 +172,12 @@ static int fsck_tree(struct tree *item, int strict, 
> fsck_error error_func)
>                       has_full_path = 1;
>               if (!*name)
>                       has_empty_name = 1;
> -             if (!strcmp(name, "."))
> -                     has_dot = 1;
> -             if (!strcmp(name, ".."))
> -                     has_dotdot = 1;
> +             if (is_dot_or_dotdot(name)) {
> +            if (name[1] == '\0')
> +                         has_dot = 1;
> +            else
> +                         has_dotdot = 1;
> +        }

The indentation is wrong. Configure your text editor to show you tabs
and spaces differently (e.g. M-x whitespace-mode RET in Emacs). Git uses
tabs to indent, and only that.

I find the old code much clearer than the new one. This "name[1] ==
'\0'" looks weird to test if name is the string ".".

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to