(git_repo: &GitRepository)
| 177 | } |
| 178 | |
| 179 | fn current_git_branch(git_repo: &GitRepository) -> Option<String> { |
| 180 | let head = git_repo.head().ok()?; |
| 181 | if !head.is_branch() { |
| 182 | return None; |
| 183 | } |
| 184 | head.shorthand().ok().map(ToOwned::to_owned) |
| 185 | } |
| 186 | |
| 187 | /// Binding transport requires the ordinary importer. Presence selects the |
| 188 | /// route only; it is not evidence that any binding is valid or trusted. |
no test coverage detected