| 996 | /* ── Public API ───────────────────────────────── */ |
| 997 | |
| 998 | static bool discover_path_is_absolute(const char *path) { |
| 999 | if (!path || !path[0]) { |
| 1000 | return false; |
| 1001 | } |
| 1002 | if (path[0] == '/' || path[0] == '\\') { |
| 1003 | return true; |
| 1004 | } |
| 1005 | #ifdef _WIN32 |
| 1006 | return isalpha((unsigned char)path[0]) && path[1] == ':'; |
| 1007 | #else |
| 1008 | return false; |
| 1009 | #endif |
| 1010 | } |
| 1011 | |
| 1012 | /* Resolve the shared "common" git directory for repo_path. |
| 1013 | * Handles three layouts: |
no outgoing calls
no test coverage detected