Tucker McKnight <tucker@pangolin.lan> | Sun Feb 01 2026
Add an isMerge attribute to commits Also fix bug where the commit message wasn't being snipped correctly on merge commits. This was because they have the extra metadata line at the top, "Merge," which means the commit message is now five lines down instead of four.
51
51
commit.isMerge ? m('span', {class: 'badge rounded-pill bg-primary me-1'}, 'merge') : null,20
20
isMerge: boolean,126 127
const compareToBranchCommits = new Set()
const thisBranchCommits = new Set()126 127
const compareToBranchCommits = new Set<string>()
const thisBranchCommits = new Set<string>()142 143
const onlyInThisBranch = Array.from(thisBranchCommits).filter(thisBranchCommit => !compareToBranchCommits.has(thisBranchCommit)).length
const onlyInCompareToBranch = Array.from(compareToBranchCommits).filter(compareToBranchCommit => !thisBranchCommits.has(compareToBranchCommit)).length142 143
const onlyInThisBranch = Array.from(thisBranchCommits).filter((thisBranchCommit) => {
return !commits.get(thisBranchCommit).isMerge && !compareToBranchCommits.has(thisBranchCommit)
}).length
const onlyInCompareToBranch = Array.from(compareToBranchCommits).filter((compareToBranchCommit) => {
return !commits.get(compareToBranchCommit).isMerge && !thisBranchCommits.has(compareToBranchCommit)
}).length66
let author: string, date: string66
let author: string, date: string, isMerge: boolean74 75
const diffStart = currentPatch.findIndex((line) => {
const commitMessage = currentPatch.slice(4, diffStart).map(str => str.replace(" ", "")).filter((line) => {74 75
else if (currentPatch[lineNumber].startsWith("Merge")) {
isMerge = true
}
let diffStart = currentPatch.findIndex((line) => {
// If no line starts with "diff", this
// is probably a mege commit. Use the last
// line of the patch + 1, in that case, to just get the full
// text of the commit
let messageStart = 4
if (diffStart === -1) {
messageStart = 5
diffStart = currentPatch.length
}
const commitMessage = currentPatch.slice(messageStart, diffStart).map(str => str.replace(" ", "")).filter((line) => {88
88
isMerge: isMerge || false,