sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
273 stars 14 forks source link

'git blame --first-parent' #1707

Open samsamoa opened 1 year ago

samsamoa commented 1 year ago

Problem description

Would it be possible to add --first-parent as an option for Blame? This option allows git blame to show only merge commits, which are often more useful than the actual commit where the line was changed (e.g. for pull request merges).

Preferred solution

Option is added to preferences that enables --first-parent by default.

Alternatives

First-parent is added as an option when Blame is selected.

samsamoa commented 1 year ago

I tried adding a custom command, but so far haven't figured out the correct syntax

[
    {
        "caption": "Blame --first-parent",
        "command": "blame",
        "args": {"argv": ["--first-parent"]}
    }
]
srbs commented 1 year ago

tried adding a custom command

The blame command is internal to Sublime Merge & is not calling git itself (as far as I know). I'm unaware of any options for that command.