diff options
Diffstat (limited to 'server')
| -rw-r--r-- | server/common/src/git.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/common/src/git.rs b/server/common/src/git.rs index 6678db7..c6a44e3 100644 --- a/server/common/src/git.rs +++ b/server/common/src/git.rs @@ -69,7 +69,7 @@ fn io_err(action: &str, e: std::io::Error) -> Error { } fn parse_user(output: String) -> User { - let mut lines = output.lines(); + let mut lines = output.split_terminator('\0'); let name = lines.next().unwrap_or("").to_string(); let username = lines.next().unwrap_or("").to_string(); let email = lines.next().unwrap_or("").to_string(); @@ -325,13 +325,13 @@ impl RepoData { } async fn get_author(&self, repo: &Repository, commit: &str) -> Result<User, Error> { - self.get_log_format(repo, commit, "%an%n%al%n%ae") + self.get_log_format(repo, commit, "%an%x00%al%x00%ae") .map_ok(parse_user) .await } async fn get_commiter(&self, repo: &Repository, commit: &str) -> Result<User, Error> { - self.get_log_format(repo, commit, "%cn%n%cl%n%ce") + self.get_log_format(repo, commit, "%cn%x00%cl%x00%ce") .map_ok(parse_user) .await } |
