* Find the commondir and gitdir of the repository that contains the current * working directory, without changing the working directory or other global * state. The result is appended to commondir and gitdir. If the discovered * gitdir does not correspond to a worktree, then 'commondir' and 'gitdir' will * both have the same result appended to the buffer. The return value is * either 0 upon
| 89 | * either 0 upon success and -1 if no repository was found. |
| 90 | */ |
| 91 | static inline int discover_git_directory(struct strbuf *commondir, |
| 92 | struct strbuf *gitdir) |
| 93 | { |
| 94 | if (discover_git_directory_reason(commondir, gitdir) <= 0) |
| 95 | return -1; |
| 96 | return 0; |
| 97 | } |
| 98 | |
| 99 | void set_git_work_tree(struct repository *repo, const char *tree); |
| 100 |
no test coverage detected