Skip to content

Commit 4754b24

Browse files
Handle fatal: bad revision '^cfa4209..HEAD'
1 parent 2fb6940 commit 4754b24

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/GitCommitsInRange.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ public override bool Execute ()
3232

3333
base.Execute ();
3434

35+
// fatal: bad revision '^cfa4209..HEAD'
36+
if (ExitCode == 128) {
37+
Log.LogMessage (MessageImportance.Normal, $"git exited with code 128. Setting {nameof (CommitCount)} to 0.");
38+
CommitCount = 0;
39+
return true;
40+
}
41+
3542
Log.LogMessage (MessageImportance.Low, $" [Output] {nameof (CommitCount)}: {CommitCount}");
3643

3744
return !Log.HasLoggedErrors;

0 commit comments

Comments
 (0)