diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-17 23:05:54 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-17 23:05:54 -0800 |
commit | 6af384ce73ad880253be5be7587f19f6fe3afcba (patch) | |
tree | c63418b88b19af0eb7ca37adfffa49408e57bc79 /remote.c | |
parent | Merge branch 'jc/maint-format-patch' (diff) | |
parent | Allow cloning to an existing empty directory (diff) | |
download | tgif-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.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 */ } |