all repos

mugit @ 7218955

馃惍 git server that your cow will love
4 files changed, 17 insertions(+), 7 deletions(-)
ui: show both authored and commited times if needed
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-05-05 16:42:58 +0300
Authored at: 2026-03-20 18:27:47 +0200
Change ID: pklzwrztquxsyqvyyvlmuvzomknnmxrs
Parent: 8b21794
M CHANGELOG.md
路路路
        12
        12
         - Better CSS for markdown readmes.

      
        13
        13
         - Add breadcrumbs on "file content" and "file tree" pages.

      
        14
        14
         - Show last commit associated with file on the "tree page".

      
        
        15
        +- Show both authored and commit time of a commit.

      
        15
        16
         - Highlight selected line on file content page.

      
        16
        17
         - `mugit repo new` now accepts `--description`, sets repo description.

      
        17
        18
         - `mugit repo new --mirror` will sync repo from specified remote.

      
M internal/git/repo.go
路路路
        123
        123
         	AuthorName     string

      
        124
        124
         	CommitterName  string

      
        125
        125
         	CommitterEmail string

      
        
        126
        +	Authored       time.Time

      
        126
        127
         	Committed      time.Time

      
        127
        128
         	ChangeID       string

      
        128
        129
         	Hash           string

      路路路
        145
        146
         		AuthorName:     c.Author.Name,

      
        146
        147
         		CommitterName:  c.Committer.Name,

      
        147
        148
         		CommitterEmail: c.Committer.Email,

      
        
        149
        +		Authored:       c.Author.When,

      
        148
        150
         		Committed:      c.Committer.When,

      
        149
        151
         		ChangeID:       changeID,

      
        150
        152
         		Hash:           c.Hash.String(),

      
M internal/git/tree.go
路路路
        171
        171
         		pathSpec = parent

      
        172
        172
         	}

      
        173
        173
         

      
        174
        
        -	output, err := g.streamingGitLog(ctx, "--pretty=format:%H,%ad,%ae,%an,%ce,%cn,%s", "--date=iso", "--name-only", "--", pathSpec)

      
        
        174
        +	output, err := g.streamingGitLog(ctx, "--pretty=format:%H,%ad,%ae,%an,%cd,%ce,%cn,%s", "--date=iso", "--name-only", "--", pathSpec)

      
        175
        175
         	if err != nil {

      
        176
        176
         		return nil, err

      
        177
        177
         	}

      路路路
        205
        205
         				current = logCommit{}

      
        206
        206
         			}

      
        207
        207
         		} else if current.hash.IsZero() {

      
        208
        
        -			parts := strings.SplitN(line, ",", 7)

      
        209
        
        -			if len(parts) == 7 {

      
        
        208
        +			parts := strings.SplitN(line, ",", 8)

      
        
        209
        +			if len(parts) == 8 {

      
        210
        210
         				current.hash = plumbing.NewHash(parts[0])

      
        211
        211
         

      
        212
        212
         				// NOTE: this is copy-paste of [newCommit]

      
        213
        213
         				current.Hash = parts[0]

      
        214
        214
         				current.HashShort = parts[0][:7]

      
        215
        
        -				current.Committed, _ = time.Parse("2006-01-02 15:04:05 -0700", parts[1])

      
        
        215
        +				current.Authored, _ = time.Parse("2006-01-02 15:04:05 -0700", parts[1])

      
        216
        216
         				current.AuthorEmail = parts[2]

      
        217
        217
         				current.AuthorName = parts[3]

      
        218
        
        -				current.CommitterEmail = parts[4]

      
        219
        
        -				current.CommitterName = parts[5]

      
        220
        
        -				current.Message = parts[6]

      
        
        218
        +				current.Committed, _ = time.Parse("2006-01-02 15:04:05 -0700", parts[4])

      
        
        219
        +				current.CommitterEmail = parts[5]

      
        
        220
        +				current.CommitterName = parts[6]

      
        
        221
        +				current.Message = parts[7]

      
        221
        222
         			}

      
        222
        223
         		} else {

      
        223
        224
         			// all ancestors along this path should also be included

      
M web/templates/repo_commit.html
路路路
        45
        45
                     <strong>Committed at:</strong>

      
        46
        46
                     {{ humanizeTime $commit.Committed }}

      
        47
        47
                   </div>

      
        
        48
        +          {{ if ne $commit.Authored $commit.Committed }}

      
        
        49
        +          <div>

      
        
        50
        +            <strong>Authored at:</strong>

      
        
        51
        +            {{ humanizeTime $commit.Authored }}

      
        
        52
        +          </div>

      
        
        53
        +          {{ end }}

      
        48
        54
                   {{ if $commit.ChangeID -}}

      
        49
        55
                   <div>

      
        50
        56
                     <strong>Change ID:</strong>