New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open on GitHub/Copy Link to Clipboard fails when tracking branch has been deleted #1780

Closed
grokys opened this Issue Jul 13, 2018 · 1 comment

Comments

Projects
1 participant
@grokys
Contributor

grokys commented Jul 13, 2018

When trying to run Open on GitHub/Copy Link to Clipboard on a branch whose tracking branch has been deleted, the following exception occurs:

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=GitHub.Exports
  StackTrace:
   at GitHub.Services.GitService.<>c__DisplayClass6_0.<GetLatestPushedSha>b__0() in D:\projects\github\VisualStudio\src\GitHub.Exports\Services\GitService.cs:line 101
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

This happens because repo.Head.TrackedBranch.Tip is null at:

https://github.com/github/VisualStudio/blob/master/src/GitHub.Exports/Services/GitService.cs?utf8=%E2%9C%93#L101

The commands fail silently.

@grokys grokys added the bug label Jul 13, 2018

@meaghanlewis meaghanlewis added this to Low Priority in BUGS Jul 30, 2018

@grokys

This comment has been minimized.

Contributor

grokys commented Oct 19, 2018

Fixed by #1971.

@grokys grokys closed this Oct 19, 2018

BUGS automation moved this from Low Priority to Done Oct 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment