diff --git a/remote.c b/remote.c
index 570e11286ea295e825a23b1d5ed40c9fbd02be57..7efaa023b985745b5555e35f8d3a8169870571bd 100644 (file)
--- a/remote.c
+++ b/remote.c
#include "commit.h"
#include "diff.h"
#include "revision.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"
+#include "dir.h"
static struct refspec s_tag_refspec = {
0,
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;
int is_glob;
const char *lhs, *rhs;
- llen = is_glob = 0;
+ is_glob = 0;
lhs = refspec[i];
if (*lhs == '+') {
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)
{
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 */
}
return 0;
return !strchr(name, '/'); /* no slash */
}