Coder Social home page Coder Social logo

laurentkempe / gitdiffmargin Goto Github PK

View Code? Open in Web Editor NEW
289.0 10.0 40.0 848 KB

Git Diff Margin displays live Git changes of the currently edited file on Visual Studio margin and scroll bar. Supports Visual Studio 2012 through Visual Studio 2022

Home Page: https://marketplace.visualstudio.com/items?itemName=LaurentKempe.GitDiffMargin

License: MIT License

PowerShell 0.17% C# 99.72% HCL 0.11%
visual-studio addin git git-diff-margin c-sharp chocolatey visual-studio-extension visual-studio-2017 visual-studio-2015 visual-studio-2019

gitdiffmargin's Introduction

Git Diff Margin VS Marketplace Rating(Short) Installs(Short)) Downloads(Short)))

Git Diff Margin displays live Git changes of the currently edited file on Visual Studio margin and scroll bar.

Build Status Build status Gitter

Features

  • Supports Visual Studio 2012 through Visual Studio 2022
  • Quickly view all current file changes on
    • Left margin
    • Scroll Bars in map and bar mode with and without source overview
      • blue rectangle for modifications
      • green rectangles for new lines
      • red triangles for deletions
      • all colors configurable through Visual Studio Fonts and Colors options
  • Undo the change
  • Copy the old code into the clipboard
  • Copy a part of the old code by selecting it in the popup
  • Show the diff in Visual Studio Diff window
  • Navigate to previous/next change on the file using user defined keyboard shortcuts or the popup icons
  • Open popup with user defined keyboard shortcuts, close with esc key
  • Support Visual Studio 2013 Dark, Light and Blue Theme
  • Support zoom
  • Diff against something other than HEAD (Advanced users)

Screenshot

For a better experience you should disable Visual Studio built in 'Track changes' bar.

Git Diff Margin version 3.2.2 is the latest release supporting Visual Studio 2010 it uses LibGit2Sharp v0.23.1 and is not being maintained. You can download it here.

Sponsor

If you use and 💗 Git Diff Margin extension you can become a sponsor now!

Installation

Grab it from inside of Visual Studio's Extension Manager searching for Git Diff Margin, or via the Extension Gallery link.

You can use Chocolatey Git Diff Margin.

Video

You might see a short video showing some Git Diff Margin features on the following page.

Contributing

Visit the Contributor Guidelines for details on how to contribute as well as the Contributor Covenant Code of Conduct for details on how to participate.

Build requirements

  • Visual Studio 2017
  • Visual Studio SDK
  • The built VSIX will work with Visual Studio 2012 to Visual Studio 2019

Build

Clone the repository and using a git GUI client or via the command line:

git clone https://github.com/laurentkempe/GitDiffMargin.git
cd GitDiffMargin

Open the GitDiffMargin.sln solution with Visual Studio 2017+, build and run!

Feedback

Credits

Thanks to

Copyright

Copyright 2012 - 2021 Laurent Kempé

Licensed under the MIT License

gitdiffmargin's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar duncansmart avatar gep13 avatar heinzbeinz avatar jcansdale avatar laurentkempe avatar ricksladkey avatar sharwell avatar ygoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitdiffmargin's Issues

Diff indicators displayed twice

See screenshot: just updated to 2.0 and there are two indicators. Not sure this is a bug or I need to disable some setting?

capture

Exception when opening Settings page

When I open Git Extensions and go to the Settings page, I immediately get the following error. I tried uninstalling & reinstalling, and I tried deleting the settings file in AppData, but I still get the error every time. I think the problem began right after I installed Visual Studio 2015 Community on the computer.

GitExtensions.exe [2.48.05]

The path is not of a legal form.

at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.Path.GetFullPath(String path)
at System.IO.FileSystemWatcher.StartRaisingEvents()
at GitCommands.Settings.FileSettingsCache.LoadImpl()
at GitCommands.SettingsCache.<>c__DisplayClass1.b__0()
at GitCommands.SettingsCache.LockedAction[T](Func1 action) at GitCommands.SettingsCache.<>c__DisplayClass1.<LockedAction>b__0() at GitCommands.SettingsCache.LockedAction[T](Func1 action)
at GitCommands.SettingsCache.EnsureSettingsAreUpToDate()
at GitCommands.SettingsCache.<>c__DisplayClass151.<TryGetValue>b__14() at GitCommands.SettingsCache.LockedAction[T](Func1 action)
at GitCommands.SettingsCache.TryGetValue[T](String name, T defaultValue, Func2 decode, T& value) at GitCommands.Settings.SettingsContainer2.TryGetValue[T](String name, T defaultValue, Func2 decode, T& value) at GitCommands.Settings.SettingsContainer2.GetValue[T](String name, T defaultValue, Func`2 decode)
at GitCommands.Settings.ConfigFileSettings.GetEncoding(String settingName)
at GitUI.CommandsDialogs.SettingsDialog.Pages.GitConfigSettingsPage.SettingsToPage()
at GitUI.CommandsDialogs.SettingsDialog.SettingsPageBase.LoadSettings()
at GitUI.CommandsDialogs.FormSettings.LoadSettings()
at GitUI.CommandsDialogs.FormSettings.FormSettings_Shown(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnShown(EventArgs e)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

Crash while deleting lines which are already changed

At the end of a file, and while deleting the file end is shorter

1147 ERROR System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: lineNumber at Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetLineFromLineNumber(Int32 lineNumber) at Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber) at GitDiffMargin.ScrollDiffMargin.UpdateDiffDimensions(DiffViewModel diffViewModel, HunkRangeInfo hunkRangeInfo) at GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.DiffMarginViewModelBase.RefreshDiffViewModelPositions() at GitDiffMargin.DiffMarginBase.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) Editor or Editor Extension 2014/08/04 08:24:17.904

1148 ERROR System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: lineNumber at Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetLineFromLineNumber(Int32 lineNumber) at Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber) at GitDiffMargin.ScrollDiffMargin.UpdateDiffDimensions(DiffViewModel diffViewModel, HunkRangeInfo hunkRangeInfo) at GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.DiffMarginViewModelBase.RefreshDiffViewModelPositions() at GitDiffMargin.DiffMarginBase.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) Editor or Editor Extension 2014/08/04 08:24:17.931

1149 ERROR System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: lineNumber at Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetLineFromLineNumber(Int32 lineNumber) at Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber) at GitDiffMargin.ScrollDiffMargin.UpdateDiffDimensions(DiffViewModel diffViewModel, HunkRangeInfo hunkRangeInfo) at GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.DiffMarginViewModelBase.RefreshDiffViewModelPositions() at GitDiffMargin.DiffMarginBase.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) Editor or Editor Extension 2014/08/04 08:24:17.944

Add option to ignore whitespace changes

I would love to be able to toggle whitespace sensitivity on and off in GitDiffMargin. (Equivalent to passing the --ignore-space-change option to git diff.)

When I have changed the indentation of a large block of code, I usually don't want to see the entire block highlighted, just the lines I've materially changed.

Allow side by side working with Git Source Control Provider

In #9 @RandScullard report

"I am using the Git Source Control Provider extension for Visual Studio, and it includes a version of GitDiffMargin. I would like to upgrade to your latest version of GitDiffMargin that includes this fix, but if both extensions are installed, I get an error. Is there a way to have these two extensions coexist, or somehow remove GitDiffMargin from Git Source Control Provider?

I emailed you the ActivityLog.xml that Visual Studio 2012 created when I tried to run both at the same time. I believe the key entries are:

  <entry>
    <record>652</record>
    <time>2013/10/21 13:04:10.787</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.ComponentModel.Composition.ImportCardinalityMismatchException: Duplicate EditorFormatDefinition exports with identical name attributes exist. Duplicate name is GITDIFFADDITION</description>
  </entry>
  <entry>
    <record>653</record>
    <time>2013/10/21 13:04:10.787</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.ComponentModel.Composition.ImportCardinalityMismatchException: Duplicate EditorFormatDefinition exports with identical name attributes exist. Duplicate name is GITDIFFMODIFICATION</description>
  </entry>
  <entry>
    <record>654</record>
    <time>2013/10/21 13:04:10.787</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.ComponentModel.Composition.ImportCardinalityMismatchException: Duplicate EditorFormatDefinition exports with identical name attributes exist. Duplicate name is GITDIFFREMOVED</description>
  </entry>"

Visual Studio 2015 errors

| 2336 | ERROR | System.ArgumentException: The path is not of a legal form. at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetFullPathInternal(String path) at System.IO.Path.GetFullPath(String path) at GitDiffMargin.DiffMarginFactoryBase.TryGetMarginCore(IWpfTextViewHost textViewHost) at GitDiffMargin.EditorDiffMarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin) at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.b__2(IWpfTextViewMarginProvider mp) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy2 provider, Func2 getter) | Editor or Editor Extension | 2014/11/11 11:03:53.568 |
| 2337 | ERROR | System.ArgumentException: The path is not of a legal form. at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetFullPathInternal(String path) at System.IO.Path.GetFullPath(String path) at GitDiffMargin.DiffMarginFactoryBase.TryGetMarginCore(IWpfTextViewHost textViewHost) at GitDiffMargin.ScrollDiffMarginFactory2013.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin) at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.b__2(IWpfTextViewMarginProvider mp) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy2 provider, Func2 getter) | Editor or Editor Extension | 2014/11/11 11:03:53.574 |

CRLF detection fails for files checked in with CRLF line endings

With v1.3 if:

  • The checked in file in the repository actually contains CRLF line endings and
  • The repository has core.autocrlf=true

then GitDiffMargin will show the entire file as a having been changed. This happens whether the file in the repository is "denormalized" (has the text attribute) or whether it is by design (the file has the -text attribute).

In git, if the .gitattributes file specifies that a given file or files is not text (via the -text specifier), then no end of line conversion will be performed on that file.

Ironically, the GitDiffMargin repository itself contains some denormalized files, i.e. checked in with CRLF line endings, as can be seen by checking the repository out in Linux:

BackgroundParser.cs:                       UTF-8 Unicode (with BOM) C program text
DiffAdditionEditorFormatDefinition.cs:     UTF-8 Unicode (with BOM) C++ program text
DiffModificationEditorFormatDefinition.cs: UTF-8 Unicode (with BOM) C++ program text
DiffParseResultEventArgs.cs:               UTF-8 Unicode (with BOM) C++ program text
DiffRemovedEditorFormatDefinition.cs:      UTF-8 Unicode (with BOM) C++ program text
DiffUpdateBackgroundParser.cs:             UTF-8 Unicode (with BOM) C++ program text, with CRLF line terminators
Extensions.cs:                             UTF-8 Unicode (with BOM) C++ program text
GitDiffMargin.cs:                          UTF-8 Unicode (with BOM) C++ program text, with CRLF line terminators
GitDiffMarginFactory.cs:                   UTF-8 Unicode (with BOM) C++ program text, with CRLF line terminators
GitDiffMarginTextViewOptions.cs:           UTF-8 Unicode (with BOM) C++ program text
ParseResultEventArgs.cs:                   UTF-8 Unicode (with BOM) C program text
WeakReference.cs:                          UTF-8 Unicode (with BOM) C program text

Make old chocolatey packages depend to the new one

Suggestion from @gep13

"What I would suggest is this...

You push one more version of the older package, which removes everything within that package, i.e. the chocolateyInstall.ps1 file, etc. If you wanted, you could leave the chocolateyInstall.ps1 file there, but only have a message about this old package being deprecated. And update the *.nuspec file to take a dependency on the new version of the package. That way, anyone installing the old package, will automatically get the new package."

SQL Server Object Explorer issue

Hi,

Using Visual Studio 2015

I get an exception when opening a sql table definition from Visual Studio > SQL Server Object Explorer.

Here is the entry from the ActivityLog.xml:

Error
Editor or Editor Extension

System.ArgumentException: The path is not of a legal form. at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetFullPathInternal(String path) at GitDiffMargin.DiffMarginFactoryBase.TryGetMarginCore(IWpfTextViewHost textViewHost) at GitDiffMargin.EditorDiffMarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin) at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__3(IWpfTextViewMarginProvider mp) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy2 provider, Func2 getter)

Fix exception in ActivityLog.xml

875 ERROR System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: lineNumber at Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetLineFromLineNumber(Int32 lineNumber) at Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber) at GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.DiffViewModel.SetDisplayProperties() at GitDiffMargin.ViewModel.DiffMarginViewModel.RefreshDiffViewModelPositions() at GitDiffMargin.ViewModel.DiffMarginViewModel.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) Editor or Editor Extension 2013/04/05 12:55:25.102

876 ERROR System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: lineNumber at Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetLineFromLineNumber(Int32 lineNumber) at Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber) at GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions() at GitDiffMargin.ViewModel.DiffViewModel.SetDisplayProperties() at GitDiffMargin.ViewModel.DiffMarginViewModel.RefreshDiffViewModelPositions() at GitDiffMargin.ViewModel.DiffMarginViewModel.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args) Editor or Editor Extension 2013/04/05 12:55:25.113

submodules issue

System.ArgumentException: The directory name C:\dev\SqorRest.git\modules\packages.git is invalid.

This is a repo that has submodules. The submodules are located under "packages". Under packages there are four submodules. The directory ".git" does not exist under "packages" and I do not know why the extension is trying to look for such a folder. Let me know if I can provide any further info.

Add an option to not highlight changes on the index

It would be great if git diff margin would ignore changes that I added to the index. I often like to stage my work that I am confident of to the index and then I would like to not see those changes anymore in the decorations.

This should probably be configurable in an option.

Crashes VS 2013

Upgraded Git Diff Margin 2013 to version 2.0.0.0 via VS2013 "Extensions and Updates" (a.k.a. NuGet). Now, VS crashes after about 20 seconds.

UPDATE: I uninstalled Git Diff Margin, and VS is still crashing. Hmmm... Ok, so unless something got left behind (or broken) by the previous installation, it looks like Git Diff Margin is off the hook for this problem. Or not... the problem started happening immediately after I upgraded to the latest version...

UPDATE: I reinstalled Git Diff Margin and the problem seems to have gone away. Gotta love software...

Support for VS2010 (or even VS2008)

What would be involved in porting this over to an earlier version of Visual Studio, say VS2010?

Is it possible to add the left side margin, like you have done, in the absence of MEF support?

Adapt the way to read the external diff tool configuration in .gitconfig

With Semantic merge

[diff]
tool = semanticdiff

[difftool "semanticdiff"]
cmd = C:/Users/Laurent/AppData/Local/PlasticSCM4/semanticmerge/semanticmergetool.exe -s "$LOCAL" -d "$REMOTE"

[difftool]
prompt = false

With p4merge

[difftool "p4merge"]
path = C:/Program Files/Perforce/p4merge.exe
cmd = "C:/Program Files/Perforce/p4merge.exe" "$LOCAL" "$REMOTE"
[diff]
guitool = p4merge

Margin doesn't appear for .html files

The GitDiffMargin doesn't appear for .html files, unless you use Open With... and choose "Source Code (Text) Editor". It seems as if it isn't registering itself with the default editor, "HTML Editor".

VS2015 RTM

Does this support VS2015 RTM? If so, perhaps the docs could be updated. Also, the copyright year is 2014 in the installer.

Crash on line suppression

Sometimes when deleting one or more lines in a source file, GitDiffMargin makes VisualStudio crash.

Here's the log:

System.ArgumentOutOfRangeException: L'argument spécifié n'était pas dans les limites de la plage des valeurs valides.
Nom du paramètre : lineNumber
   à Microsoft.VisualStudio.Text.Implementation.BinaryStringRebuilder.GetLineFromLineNumber(Int32 lineNumber)
   à Microsoft.VisualStudio.Text.Implementation.TextSnapshot.GetLineFromLineNumber(Int32 lineNumber)
   à GitDiffMargin.ViewModel.DiffViewModel.UpdateDimensions()
   à GitDiffMargin.ViewModel.DiffMarginViewModel.RefreshDiffViewModelPositions()
   à GitDiffMargin.ViewModel.DiffMarginViewModel.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e)
   à Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)

Loading a solution not under git raise exception

System.ArgumentNullException: Value cannot be null. Parameter name: path at System.IO.Path.GetFullPathInternal(String path) at System.IO.Path.GetFullPath(String path) at GitDiffMargin.Git.GitCommands.IsGitRepository(String directory) at GitDiffMargin.DiffUpdateBackgroundParser..ctor(ITextBuffer textBuffer, TaskScheduler taskScheduler, ITextDocumentFactoryService textDocumentFactoryService, SVsServiceProvider serviceProvider, IGitCommands commands) at GitDiffMargin.ViewModel.DiffMarginViewModel..ctor(GitDiffMargin margin, IWpfTextView textView, ITextDocumentFactoryService textDocumentFactoryService, SVsServiceProvider serviceProvider, IGitCommands gitCommands) at GitDiffMargin.GitDiffMargin..ctor(IWpfTextView textView, MarginFactory factory) at GitDiffMargin.MarginFactory.CreateMargin(IWpfTextViewHost textViewHost, IWpfTextViewMargin containerMargin) at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.b__2(IWpfTextViewMarginProvider mp) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy2 provider, Func2 getter)

Show Difference fails with DiffMerge for file names with spaces

I have DiffMerge configured as my diff tool as follows.

[diff]
    tool = diffmerge
[difftool "diffmerge"]
    cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" $LOCAL $REMOTE

I can use Compare with Unmodified... in the VS2013 Changes window and the diff opens in DiffMerge as expected. But when I use GitDiffMargin's Show Difference for the same file, which happens to have spaces in the path, I get DiffMerge errors like this.

File (C:\Projects\Database\DeviceConfiguration\Schemas\dynamix\Stored) not found.  File (Procedures\CopyLibraryForNewDatabase.sql) not found.

The full path to the file is

C:\Projects\Database\DeviceConfiguration\Schemas\dynamix\Stored Procedures\CopyLibraryForNewDatabase.sql

so it appears that the path is being split on the space.

I wondered if quoting the arguments to the command in .gitconfig would make a difference so I tried changing it to

[difftool "diffmerge"]
cmd = \"C:\\Program Files\\SourceGear\\Common\\DiffMerge\\sgdm.exe\" \"$LOCAL\" \"$REMOTE\"

but this did not solve the problem.

Move diff bar to the right of the line numbers

The git Source Control Provider extension shows the diff bar right of the document changes bar, with is right of line numbers. Can GitDiffMargin do the same? I have line numbers enabled everywhere by default because it helps a lot when debugging or reading compile errors or other messages. Now I have two colour bars far away from each other. It would be nice if they were close to each other, preferably in the order that the old GitSCC extension (which is no longer available for VS 2015) uses.

The whole file is highlighted as modified

If a file has any changes, the whole file is highlighted as modified. The bug is reproduced with all other extensions disabled.

Visual C++ project, C++ file, Visual Studio 2015, Windows 10 x64 (same was under Windows 7 x64), GitDiffMargin v3.1.0.0.

git diff margin bug

Exception on closing files when UnityVS and GitDiffMargin are both installed

Salut Laurent!

A UnityVS customer reported a crash when both UnityVS and GitDiffMargin are installed.

A screenshot of the stacktrace:

error
source

Do you have any idea what UnityVS could be doing to triggers this?

In the meantime, a quick fix may be to do in GitDiffMargin:

diff --git a/GitDiffMargin/ViewModel/DiffViewModel.cs b/GitDiffMargin/ViewModel/DiffViewModel.cs
index 788509d..0bfa536 100644
--- a/GitDiffMargin/ViewModel/DiffViewModel.cs
+++ b/GitDiffMargin/ViewModel/DiffViewModel.cs
@@ -74,7 +74,7 @@ namespace GitDiffMargin.ViewModel

         private void UpdateDimensions()
         {
-            if (_reverted)
+            if (_reverted || _textView.IsClosed)
                 return;

             var hunkLineNumber = _hunkRangeInfo.NewHunkRange.StartingLineNumber + _hunkRangeInfo.NewHunkRange.NumberOfLines - 1;

Thoughts?

Turn margin to grey brush

As developer, when I modify source code and before I save the modification, I want to see the previous diff margins in grey, so that I know that there are not up to date

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.