Skip to content

Copying the commit author adds single ticks in wrong places #3933

@ekorchmar

Description

@ekorchmar

Describe the bug
When copying author name (and e-mail), Lazygit adds single ticks around the coppied string; however, last ticks lands just before the closing angle bracket.

So instead of copying 'Eduard <korchmar.eduard+git@gmail.com>', it would end up with 'Eduard <korchmar.eduard+git@gmail.com'>.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Commits panel in any repo with commits
  2. Press y (copy commit attribute) and a (copy commit author)
  3. Go into any text editor, shell or editable text field inside Lazygit
  4. Paste the clipboard content and see the malformed author string.

Expected behavior
Added ticks surround the entire copied string.

Screenshots
image

Version info:
Run lazygit --version and paste the result here
commit=v0.44.1, build date=2024-09-18T13:19:48Z, build source=binaryRelease, version=0.44.1, os=linux, arch=amd64, git version=2.46.1
Run git --version and paste the result here
git version 2.46.1

The bug is also observable in manually built binary from the current latest commit.

Additional context
I do not understand why ticks are being added at all, but I assume for portability? I will assume this is intended and useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions