Skip to content

Commit

Permalink
add names to vs diff tool files
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Aug 5, 2021
1 parent dc03f11 commit 9bdef4b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/diff-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ While SublimeMerge is not MDI, it is treated as MDI since it uses a single share

#### Windows settings:

* Example arguments: `/diff "tempFile" "targetFile"`
* Example arguments: `/diff "tempFile" "targetFile" "tempFile" "targetFile"`
* Scanned paths:

* `%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe`
Expand Down
2 changes: 1 addition & 1 deletion src/DiffEngine.Tests/diffTools.include.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ While SublimeMerge is not MDI, it is treated as MDI since it uses a single share

#### Windows settings:

* Example arguments: `/diff "tempFile" "targetFile"`
* Example arguments: `/diff "tempFile" "targetFile" "tempFile" "targetFile"`
* Scanned paths:

* `%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe`
Expand Down
8 changes: 7 additions & 1 deletion src/DiffEngine/Implementation/VisualStudio.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using DiffEngine;

static partial class Implementation
Expand All @@ -15,7 +16,12 @@ public static Definition VisualStudio()
cost: "Paid and free options",
binaryExtensions: Array.Empty<string>(),
windows: new(
(temp, target) => $"/diff \"{temp}\" \"{target}\"",
(temp, target) =>
{
var tempTitle = Path.GetFileName(temp);
var targetTitle = Path.GetFileName(target);
return $"/diff \"{temp}\" \"{target}\" \"{tempTitle}\" \"{targetTitle}\"";
},
@"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Preview\Common7\IDE\devenv.exe",
@"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe",
@"%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe",
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649</NoWarn>
<Version>6.9.2</Version>
<Version>6.10.0</Version>
<AssemblyVersion>1.0.0</AssemblyVersion>
<PackageTags>Testing, Snapshot, Diff, Compare</PackageTags>
<Description>Launches diff tools based on file extensions. Designed to be consumed by snapshot testing libraries.</Description>
Expand Down

0 comments on commit 9bdef4b

Please sign in to comment.