Visual Studio Extensibility: Get the Git repository's path from Team Explorer's Git Commit Details page -


i adding git integration visual studio extension diff files, allows diffing (i.e. comparing) files in team explorer window previous version. have working git changes page (in team explorer), since when the microsoft.teamfoundation.git.controls.extensibility.ichangesext service files in it's includedchanges property contain full file path on disk. however, when working git commit details page the microsoft.teamfoundation.git.controls.extensibility.icommitdetailsext service, changes property contains file paths relative git branch.

i'm using the libgit2sharp library interact git repository, , in able access git repository libgit2sharp requires path file in repository. since icommitdetailsext changes property contains file paths relative git repo, don't know how path git repo (so can retrieve previous versions of file compare against).

at first thought access path solution file using dte object, realized it's possible view pending changes , previous commits git repo team explorer without have solution open, won't work.

so how can know git repository git commit details page showing commits from? none of other properties on icommitdetailsext service seem have repository information i'm after (i.e. full file path file in repo). there different service getting give git provider information?

i have posted this question on msdn forums in hopes microsoft can perhaps provide answer.

thanks in advance.

while maybe not ideal - 1 option (for vs 2013 update 3+ , vs 2015), use igitext extensibility point current active repository. added in visual studio 2013 update 3, not work earlier clients. igitext contains property current activerepositories (which contain single item).

i did not find documentation on msdn (yet), can github visual studio extension see how use example of getting igitext service , accessing activerepositories property.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -