Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue #194: fix error message when deleting branch

  • Loading branch information...
commit 2ef3877c685157cda472a475a98b1fd41a5e4680 1 parent 58bc7b4
David Ebbo davidebbo authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 Kudu.Core/SourceControl/Git/GitDeploymentRepository.cs
8 Kudu.Core/SourceControl/Git/GitDeploymentRepository.cs
View
@@ -60,6 +60,14 @@ public PushInfo GetPushInfo()
{
string oldId = pushDetails[0];
string newId = pushDetails[1];
+
+ // When a branch gets deleted, the newId is an all-zero string.
+ // In those cases, we never want to do anything, so return null
+ if (newId.Trim('0').Length == 0)
+ {
+ return null;
+ }
+
string reference = pushDetails[2];
string branch = reference.Split('/').Last().Trim();
string fullNewId = _repository.Resolve(branch);
Please sign in to comment.
Something went wrong with that request. Please try again.