lazygit/pkg/commands/git_commands
Moritz Haase 8fb47fb7d6 pkg/commands: Don't duplicate line breaks when retrieving commit message
When using the "copy commit message to clipboard" action, the message will end
up in the clipboard with duplicate line breaks. The same issue also affects the
"Reword Commit" command. GetCommitMessage(), the function used to retrieve the
commit message first splits the output returned by git into separate lines -
without removing the line breaks. After removing the first line (which contains
the commit SHA), it joins the lines of the message itself back together - adding
a second set of line breaks along the way. Stop this from happening.

Fixes #1808.
2022-03-23 08:19:17 +11:00
..
bisect.go select current bisect commit even if bisect was started on another branch 2022-01-26 19:29:17 +11:00
bisect_info.go select current bisect commit even if bisect was started on another branch 2022-01-26 19:29:17 +11:00
branch.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
branch_test.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
commit.go pkg/commands: Don't duplicate line breaks when retrieving commit message 2022-03-23 08:19:17 +11:00
commit_test.go pkg/commands: Don't duplicate line breaks when retrieving commit message 2022-03-23 08:19:17 +11:00
common.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
config.go restore field 2022-01-09 14:09:53 +11:00
custom.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
deps_test.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
file.go open code in existing window 2022-03-16 19:55:58 +11:00
file_test.go Support line offset for most common editors by default 2022-03-16 19:55:58 +11:00
flow.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
patch.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
rebase.go update linters 2022-03-19 12:12:57 +11:00
rebase_test.go add some more linters 2022-01-09 14:09:53 +11:00
remote.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
stash.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
stash_test.go add some more linters 2022-01-09 14:09:53 +11:00
status.go refactor to group up more commonly used git command stuff 2022-01-18 22:01:09 +11:00
submodule.go add a file close that was missed 2022-01-26 14:50:47 +11:00
sync.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
sync_test.go add some more linters 2022-01-09 14:09:53 +11:00
tag.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
working_tree.go improve merge conflict flow 2022-01-26 14:50:47 +11:00
working_tree_test.go improve merge conflict flow 2022-01-26 14:50:47 +11:00