Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue where github.preserve-pull-request-description=true was …
…adding \n to commit message. Summary: While #863 fixed some important issues with respect to recognizing `\r\n`, it also introduced a new issue where running `sl pr s` with `github.preserve-pull-request-description=true` would inadvertently add an extra `\n` before the horizontal rule delimiting the Sapling stack information. This fixes `create_pull_request_title_and_body()` to preserve whatever whitespace was originally present before the horizontal rule, only adding a new `\n` to the end of the commit message if it did not already have one. Test Plan: ``` ./tests/run-tests.py ./tests/test-doctest.py ```
- Loading branch information