git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Riesen <raa.lkml@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Git Mailing List <git@vger.kernel.org>,
	Johannes Sixt <j.sixt@viscovery.net>, Jeff King <peff@peff.net>,
	layer <layer@known.net>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] git clone needs to know executability of template files
Date: Thu, 19 Mar 2009 22:43:38 +0100	[thread overview]
Message-ID: <20090319214338.GA7653@blimp.localdomain> (raw)
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 <raa.lkml@gmail.com>
---
 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

  reply	other threads:[~2009-03-19 21:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-19 10:27 [PATCH] Define a version of lstat(2) with posix semantics Alex Riesen
2009-03-19 10:57 ` Johannes Schindelin
2009-03-19 21:40   ` Alex Riesen
2009-03-19 21:43     ` Alex Riesen [this message]
2009-03-19 23:30     ` Johannes Schindelin
2009-03-20  8:30       ` Alex Riesen
2009-03-20  9:17         ` Johannes Schindelin
2009-03-20 13:39           ` Alex Riesen
2009-03-20 13:49             ` Rogan Dawes
2009-03-20 14:17               ` Alex Riesen
2009-03-20 13:52             ` Johannes Schindelin
2009-03-20 14:20               ` Alex Riesen
2009-03-19 22:08   ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2009-03-19 10:28 [PATCH] git clone needs to know executability of template files Alex Riesen
2009-03-19 10:57 ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090319214338.GA7653@blimp.localdomain \
    --to=raa.lkml@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    --cc=layer@known.net \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).