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

[PATCH] Test for windows format absolute paths on cygwin too

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Aug 31, 2007, 09:07 UTC
Message-ID
<xMhwifY1.1188551240.4001640.roro@localhost>
---
Requires cherry-picking 6397c3119ecaa258b5185315c64062bec29bcd86
 sha1_file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index 97ea448..fa867b8 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -84,7 +84,7 @@ int get_sha1_hex(const char *hex, unsigned char *sha1)
 /* returns the number of chars to skip to first component */
 static inline int is_path_absolute(const char *path)
 {
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || defined(__CYGWIN__)
 	if (isalpha(path[0]) && path[1] == ':')
 		return 2 + (path[2] == '/');
 	/* TODO: C:dir/file 'relative' paths are not catered for */
--
1.5.3.rc7.25.g5389f-dirty
Next: Johannes Sixt
Message 1 of 3 in “Test for windows format absolute paths on cygwin too”
  1. Test for windows format absolute paths on cygwin tooRobin Rosenberg, Aug 31, 2007
  2. Johannes SixtAug 31, 2007
  3. Robin RosenbergAug 31, 2007

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.