From: Alex Riesen Date: Thu, 19 Mar 2009 21:43:38 GMT Subject: [PATCH] git clone needs to know executability of template files Message-ID: <20090319214338.GA7653@blimp.localdomain> In-Reply-To: <20090319214001.GA6253@blimp.localdomain> Use posix_lstat for template source. The copy_templates_1 needs to know the file mode information for the copy of the template. The copying of the executable bit always work on POSIX systems and sometimes even on Cygwin. Signed-off-by: Alex Riesen --- builtin-init-db.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin-init-db.c b/builtin-init-db.c index ee3911f..0b6dc16 100644 --- a/builtin-init-db.c +++ b/builtin-init-db.c @@ -66,7 +66,7 @@ static void copy_templates_1(char *path, int baselen, else exists = 1; - if (lstat(template, &st_template)) + if (posix_lstat(template, &st_template)) die("cannot stat template %s", template); if (S_ISDIR(st_template.st_mode)) { -- 1.6.2.1.237.g7206c6