Skip to content

Comments

fix parsing of git blame output#436

Merged
tanvirtin merged 1 commit intotanvirtin:mainfrom
sabowski:fix-parsing-of-git-blame-output
Feb 20, 2026
Merged

fix parsing of git blame output#436
tanvirtin merged 1 commit intotanvirtin:mainfrom
sabowski:fix-parsing-of-git-blame-output

Conversation

@sabowski
Copy link
Contributor

When the output of git blame is parsed some of the data is missed. Each line of output from git blame is split on spaces, however if the line of output has more than one space then everything after the second space is missed. For example if the author name contains a space:

author John Smith

The author name in live blame will only show "John", not "John Smith".

This change updates the parsing so that everything after the first whitespace in a line is considered the full value of that field.

The check for nil is needed so we properly ignore the last line of git blame output, which the text from the line in the file preceded by a tab.

@tanvirtin tanvirtin merged commit 77ebbeb into tanvirtin:main Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants