src/Models/Commit.ps1
|
# Commit — Datos mínimos de un commit git para listings y graphs. class Commit { [string] $Hash # short hash, 7 chars típicamente [string] $Message # primera línea del commit message [string] $Author # nombre o usuario [string] $Date # representación humana ("2h", "1d", etc.) Commit() { } Commit([string]$hash, [string]$message, [string]$author, [string]$date) { $this.Hash = $hash $this.Message = $message $this.Author = $author $this.Date = $date } [string] ToString() { return "$($this.Hash) $($this.Message)" } } |