Skip to content

Commit 9edf81a

Browse files
committed
Correctly handle case where version file is deleted after existing
1 parent f92d363 commit 9edf81a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/NerdBank.GitVersioning/VersionOracle.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ private static bool IsVersionFileChangedInWorkingTree(VersionOptions committedVe
432432
return !EqualityComparer<VersionOptions>.Default.Equals(workingVersion, committedVersion);
433433
}
434434

435-
return false; // a missing working version is allowed and not a change.
435+
// A missing working version is a change only if it was previously commited.
436+
return committedVersion != null;
436437
}
437438
}
438439
}

0 commit comments

Comments
 (0)