X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=remote.c;h=d7079c6dd871dc1b482d347d013438fe30cc0908;hb=4c58a7111d9fb4f62ca041fc73e8aec0a2f9c800;hp=570e11286ea295e825a23b1d5ed40c9fbd02be57;hpb=fcd3549ef239378d1d2ca11df9e8c91f7fa0ab2e;p=git.git diff --git a/remote.c b/remote.c index 570e11286..d7079c6dd 100644 --- a/remote.c +++ b/remote.c @@ -4,6 +4,7 @@ #include "commit.h" #include "diff.h" #include "revision.h" +#include "dir.h" static struct refspec s_tag_refspec = { 0, @@ -634,10 +635,7 @@ static struct refspec *parse_push_refspec(int nr_refspec, const char **refspec) static int valid_remote_nick(const char *name) { - if (!name[0] || /* not empty */ - (name[0] == '.' && /* not "." */ - (!name[1] || /* not ".." */ - (name[1] == '.' && !name[2])))) + if (!name[0] || is_dot_or_dotdot(name)) return 0; return !strchr(name, '/'); /* no slash */ }