Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] ability to remember/save last selected Merge Option dropdown option selected #809

Open
Cirtoyt opened this issue Dec 11, 2024 · 1 comment
Assignees
Labels
suggestion We are still considering whether it is necessary to add this feature

Comments

@Cirtoyt
Copy link

Cirtoyt commented Dec 11, 2024

As the title explains, I'd like the ability to have SourgeGit remember the last dropdown option I selected when I do a Merge, as personally I am constantly having to change the selection to "No Fast-forward", as that's my preferred way of merging branches. Could this be added?

@love-linger
Copy link
Collaborator

Currently, the merge action repects repository's git configuration branch.{BRANCH_NAME}.mergeoptions. See the code:

private Models.MergeMode AutoSelectMergeMode()
{
    var config = new Commands.Config(_repo.FullPath).Get($"branch.{Into}.mergeoptions");
    if (string.IsNullOrEmpty(config))
        return Models.MergeMode.Supported[0];
    if (config.Equals("--no-ff", StringComparison.Ordinal))
        return Models.MergeMode.Supported[1];
    if (config.Equals("--squash", StringComparison.Ordinal))
        return Models.MergeMode.Supported[2];
    if (config.Equals("--no-commit", StringComparison.Ordinal) || config.Equals("--no-ff --no-commit", StringComparison.Ordinal))
        return Models.MergeMode.Supported[3];

    return Models.MergeMode.Supported[0];
}

@love-linger love-linger self-assigned this Dec 12, 2024
@love-linger love-linger added the suggestion We are still considering whether it is necessary to add this feature label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion We are still considering whether it is necessary to add this feature
Projects
None yet
Development

No branches or pull requests

2 participants