Skip to content

Commit

Permalink
Use ArgumentBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Jul 18, 2018
1 parent 09e3737 commit a306eb6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions GitUI/CommandsDialogs/FormFileHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,17 @@ private void LoadFileHistory()
// note: This implementation is quite a quick hack (by someone who does not speak C# fluently).
//

string arg = "log --format=\"%n\" --name-only --follow " +
GitCommandHelpers.FindRenamesAndCopiesOpts()
+ " -- \"" + fileName + "\"";
Process p = Module.RunGitCmdDetached(arg, GitModule.LosslessEncoding);
var args = new ArgumentBuilder
{
"log",
"--format=\"%n\"",
"--name-only",
"--format",
GitCommandHelpers.FindRenamesAndCopiesOpts(),
"--",
fileName.Quote()
};
Process p = Module.RunGitCmdDetached(args.ToString(), GitModule.LosslessEncoding);

// the sequence of (quoted) file names - start with the initial filename for the search.
var listOfFileNames = new StringBuilder("\"" + fileName + "\"");
Expand Down

0 comments on commit a306eb6

Please sign in to comment.