summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-01-17 23:05:54 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-17 23:05:54 -0800
commit6af384ce73ad880253be5be7587f19f6fe3afcba (patch)
treec63418b88b19af0eb7ca37adfffa49408e57bc79 /remote.c
parentMerge branch 'jc/maint-format-patch' (diff)
parentAllow cloning to an existing empty directory (diff)
downloadtgif-6af384ce73ad880253be5be7587f19f6fe3afcba.tar.xz
Merge branch 'ap/clone-into-empty'
* ap/clone-into-empty: Allow cloning to an existing empty directory add is_dot_or_dotdot inline function
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/remote.c b/remote.c
index 570e11286e..d7079c6dd8 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 */
}