X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=remote.c;h=d7079c6dd871dc1b482d347d013438fe30cc0908;hb=5dc1308562ab5991ecada68b06707709bea408c9;hp=570e11286ea295e825a23b1d5ed40c9fbd02be57;hpb=521ae135b7dcae27fb78e1b941f50158558108e6;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 */ }