git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git clone needs to know executability of template files

From
Alex Riesen <raa.lkml@gmail.com>
Date
Mar 19, 2009, 21:43 UTC
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 <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
Previous: Alex RiesenNext: Johannes Schindelin
Message 4 of 13 in “Define a version of lstat(2) with posix semantics”
  1. Define a version of lstat(2) with posix semanticsAlex Riesen, Mar 19, 2009
  2. Johannes SchindelinMar 19, 2009
  3. Alex RiesenMar 19, 2009
  4. git clone needs to know executability of template filesAlex Riesen, Mar 19, 2009
  5. Johannes SchindelinMar 19, 2009
  6. Alex RiesenMar 20, 2009
  7. Johannes SchindelinMar 20, 2009
  8. Alex RiesenMar 20, 2009
  9. Rogan DawesMar 20, 2009
  10. Alex RiesenMar 20, 2009
  11. Johannes SchindelinMar 20, 2009
  12. Alex RiesenMar 20, 2009
  13. Junio C HamanoMar 19, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.