- returns `null` to fallback to git's `merge.ff` configure when user does not configure `Preferred Merge Mode`
- since `GetGitConfigBranchMergeOptions` is the last one, returns `Default` as fallback
Signed-off-by: leo <longshuang@msn.cn>
After changing the priority of the preferences/configurations for the
merge mode in #1495, the git configuration `merge.ff` was ignored. The
reason is, that `GetSettingsPreferredMergeMode()` does not return `null`
in the default case. This is now fixed.
This adds another configuration possibility for the default merge mode
to the already existing per branch git configuration
`branch.<name>.mergeoptions` (#540) and the per repo preference
"Preferred Merge Mode" (#1156).
Defined values:
- `false`: do no fast-forward merge
- `only`: do only a fast-forward merge
This is configurable by for example `git config set --global merge.ff
<value>` for a global (meaning the current user) configuration.
The priority between these configurations/preferences is:
- git configuration `branch.<name>.mergeoptions` (#540)
- git configuration `merge.ff`
- preference "Preferred Merge Mode" (#1156)
- Check `Type` instead of `Name` while selecting external shell/terminal
- External merge tool named `Custom` is not supported
- Add `try-catch` statement to other file pickers in `Preferences` window
Signed-off-by: leo <longshuang@msn.cn>
- Style for `ContentPresenter` in `ItemsControl.Styles` also overrides the default style of TextBox
- Use simple for-each-loop instead of Linq expr
Signed-off-by: leo <longshuang@msn.cn>
Move `Commands.IsCommitSHA` testing from `Commands.QuerySingleCommit` to `ViewModels.Repository.StartSearchCommits`, because we only need test the SHA user typed in
Signed-off-by: leo <longshuang@msn.cn>
Searching for a tree or blob hash instead of a commit hash created a
seemingly never-ending search (internally an exception was thrown).
Examples for non-ending searches in the SourceGit repository itself are
searching for 6b83a0a (that is the tree "src" of commit 190d2ee) or
e686a53 (that is the file ".gitignore" in the tree of commit 190d2ee).