A `--show-prefix` answer: empty at the repository root, otherwise a * '/'-terminated relative directory. */
| 17835 | /* A `--show-prefix` answer: empty at the repository root, otherwise a |
| 17836 | * '/'-terminated relative directory. */ |
| 17837 | static bool detect_valid_git_prefix(const char *value) { |
| 17838 | size_t length = strlen(value); |
| 17839 | return length == 0 || value[length - 1] == '/'; |
| 17840 | } |
| 17841 | |
| 17842 | /* Read one '\n'-terminated `git rev-parse` record (a trailing '\r' dropped) |
| 17843 | * into out when it is terminated, fits, and passes `valid`. Anything else is |
nothing calls this directly
no outgoing calls
no test coverage detected