GitDrive.Format.ps1xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <ViewDefinitions>

    <View>
      <Name>GitCommitInfo</Name>
      <ViewSelectedBy>
        <TypeName>GitDrive.Models.GitCommitInfo</TypeName>
      </ViewSelectedBy>
      <GroupBy>
        <PropertyName>Directory</PropertyName>
      </GroupBy>
      <TableControl>
        <TableHeaders>
          <TableColumnHeader><Label>Name</Label></TableColumnHeader>
          <TableColumnHeader><Label>Ahead</Label><Alignment>Right</Alignment></TableColumnHeader>
          <TableColumnHeader><Label>Date</Label></TableColumnHeader>
          <TableColumnHeader><Label>Author</Label></TableColumnHeader>
          <TableColumnHeader><Label>Message</Label></TableColumnHeader>
          <TableColumnHeader><Label>Refs</Label></TableColumnHeader>
        </TableHeaders>
        <TableRowEntries>
          <TableRowEntry>
            <TableColumnItems>
              <TableColumnItem>
                <ScriptBlock>if ($_.IsBranch -or $_.IsNamespace) { $mark = if ($_.IsCurrent) { '* ' } else { ' ' }; "$($PSStyle.FileInfo.Directory)$mark$($_.Name)$($PSStyle.Reset)" } else { " $($PSStyle.Foreground.Yellow)$($_.ShortSha)$($PSStyle.Reset)" }</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>if ($_.IsBranch -and $_.Ahead -gt 0) { "+$($_.Ahead)" }</ScriptBlock>
              </TableColumnItem>
              <TableColumnItem><PropertyName>DateStr</PropertyName></TableColumnItem>
              <TableColumnItem><PropertyName>Author</PropertyName></TableColumnItem>
              <TableColumnItem><PropertyName>ShortMessage</PropertyName></TableColumnItem>
              <TableColumnItem>
                <ScriptBlock>if ($_.Refs) { "$($PSStyle.Foreground.Cyan)$($_.Refs)$($PSStyle.Reset)" }</ScriptBlock>
              </TableColumnItem>
            </TableColumnItems>
          </TableRowEntry>
        </TableRowEntries>
      </TableControl>
    </View>

  </ViewDefinitions>
</Configuration>