Skip to content

Conversation

mjarkk
Copy link
Contributor

@mjarkk mjarkk commented Jul 26, 2021

Fixes #1314
This should be a better way of detecting if commits are merged into the "main/master" branch

@@ -312,14 +312,23 @@ func (c *CommitListBuilder) setCommitMergedStatuses(refName string, commits []*m
}

func (c *CommitListBuilder) getMergeBase(refName string) (string, error) {
baseBranch := c.GitCommand.TryGetMainBranch()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would benchmark how long it takes to run this function, because we could save some time by only running it once and storing the result on the git struct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple structs that have something to do with git, i hope i picked a good one :)

@mjarkk mjarkk force-pushed the fix-1314-respect-main-branch branch 2 times, most recently from 946297f to cb6f3ac Compare July 27, 2021 13:43
@mjarkk mjarkk force-pushed the fix-1314-respect-main-branch branch from cb6f3ac to 3e64b78 Compare July 27, 2021 13:55
@mjarkk mjarkk requested a review from jesseduffield July 28, 2021 13:47
@jesseduffield
Copy link
Owner

This is superceded by #2619 so I'll close it off :)

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.

Honour git config's defaultBranch when creating a new repo
3 participants