X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=remote.c;h=7efaa023b985745b5555e35f8d3a8169870571bd;hb=a9bfe813094cf2c8ea0e30c3196070c868fb294c;hp=570e11286ea295e825a23b1d5ed40c9fbd02be57;hpb=f20408dadb75914460b9251b56fe4bffb5f44f48;p=git.git diff --git a/remote.c b/remote.c index 570e11286..7efaa023b 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, @@ -494,7 +495,7 @@ static struct refspec *parse_refspec_internal(int nr_refspec, const char **refsp int is_glob; const char *lhs, *rhs; - llen = is_glob = 0; + is_glob = 0; lhs = refspec[i]; if (*lhs == '+') { @@ -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 */ }