|
|
@@ -215,14 +215,13 @@ export abstract class ShadowCheckpointService extends EventEmitter {
|
|
|
await this.stageAll(this.git)
|
|
|
const commitArgs = options?.allowEmpty ? { "--allow-empty": null } : undefined
|
|
|
const result = await this.git.commit(message, commitArgs)
|
|
|
- const isFirst = this._checkpoints.length === 0
|
|
|
const fromHash = this._checkpoints[this._checkpoints.length - 1] ?? this.baseHash!
|
|
|
const toHash = result.commit || fromHash
|
|
|
this._checkpoints.push(toHash)
|
|
|
const duration = Date.now() - startTime
|
|
|
|
|
|
- if (isFirst || result.commit) {
|
|
|
- this.emit("checkpoint", { type: "checkpoint", isFirst, fromHash, toHash, duration })
|
|
|
+ if (result.commit) {
|
|
|
+ this.emit("checkpoint", { type: "checkpoint", fromHash, toHash, duration })
|
|
|
}
|
|
|
|
|
|
if (result.commit) {
|