Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix problem in git-to-hg-commit with multiline commit messages.

  • Loading branch information...
commit 9238a88034bc111408b29862874df4a1ec333c13 1 parent 1edac5b
@jlebar jlebar authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  git-to-hg-commit
2  git-to-hg-commit
@@ -22,7 +22,7 @@ function git_log()
# If git doesn't have an e-mail address, it substitutes "<none@none>", which will mess us up.
commit_user=$(git_log '%an <%ae>' | sed -e 's/ <none@none>//')
commit_date=$(git_log '%aD')
-search_str=$(git_log ' %s')
+search_str=$(git_log ' %B' | head -n1)
# Locate the hg {desc}|{node} pair containing the commit message from search_str.
hg_str=$(hg log -R "$hg_repo" --user "$commit_user" --date "$commit_date" --template '{node} {desc|firstline}\n' | grep -F "$search_str") || true
Please sign in to comment.
Something went wrong with that request. Please try again.