Skip to content

Commit 1c96503

Browse files
vbjayRussKie
andcommitted
(split from main repo) Change all RunGitCmd to use GitArgumentBuilder
Co-authored-by: Russkie <[email protected]>
1 parent 8162b3a commit 1c96503

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

GerritUtil.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ public static async Task<string> RunGerritCommandAsync([NotNull] IWin32Window ow
2424

2525
public static Uri GetFetchUrl(IGitModule module, string remote)
2626
{
27-
string remotes = module.RunGitCmd("remote show -n \"" + remote + "\"");
27+
var args = new GitArgumentBuilder("remote")
28+
{
29+
"show",
30+
"-n",
31+
remote.QuoteNE()
32+
};
33+
34+
string remotes = module.RunGitCmd(args);
2835

2936
string fetchUrlLine = remotes.Split('\n').Select(p => p.Trim()).First(p => p.StartsWith("Push"));
3037

0 commit comments

Comments
 (0)