Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 1c441ba

Browse files
Merge branch 'fixes/git-path-file-browser' into enhancements/git-path-view
# Conflicts: # src/UnityExtension/Assets/Editor/GitHub.Unity/UI/SettingsView.cs
2 parents d3f0f8e + 66dc5d8 commit 1c441ba

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/GitHub.Api/Git/Tasks/GitStatusTask.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public GitStatusTask(IGitObjectFactory gitObjectFactory,
1515

1616
public override string ProcessArguments
1717
{
18-
get { return "-c i18n.logoutputencoding=utf8 -c core.quotepath=false status -b -u --ignored --porcelain"; }
18+
get { return "-c i18n.logoutputencoding=utf8 -c core.quotepath=false status -b -u --porcelain"; }
1919
}
2020
public override TaskAffinity Affinity { get { return TaskAffinity.Exclusive; } }
2121
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitPathView.cs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,29 @@ public override bool IsBusy
2929
public override void OnGUI()
3030
{
3131
string gitExecPath = null;
32+
string gitExecParentPath = null;
33+
3234
string extension = null;
33-
string gitInstallPath = null;
35+
3436
if (Environment != null)
3537
{
3638
extension = Environment.ExecutableExtension;
39+
3740
if (Environment.IsWindows)
3841
{
3942
extension = extension.TrimStart('.');
4043
}
4144

42-
gitInstallPath = Environment.GitInstallPath;
43-
4445
if (Environment.GitExecutablePath != null)
46+
{
4547
gitExecPath = Environment.GitExecutablePath.ToString();
48+
gitExecParentPath = Environment.GitExecutablePath.Parent.ToString();
49+
}
50+
51+
if (gitExecParentPath == null)
52+
{
53+
gitExecParentPath = Environment.GitInstallPath;
54+
}
4655
}
4756

4857
// Install path
@@ -57,7 +66,7 @@ public override void OnGUI()
5766
gitExecPath = EditorGUILayout.TextField("Path to Git", gitExecPath);
5867
if (GUILayout.Button(BrowseButton, EditorStyles.miniButton, GUILayout.Width(25)))
5968
{
60-
var newValue = EditorUtility.OpenFilePanel(GitInstallBrowseTitle, gitInstallPath, extension);
69+
var newValue = EditorUtility.OpenFilePanel(GitInstallBrowseTitle, gitExecParentPath, extension);
6170

6271
if (!string.IsNullOrEmpty(newValue))
6372
{

0 commit comments

Comments
 (0)