ExportData implements the cmdutil exportable interface for the directory. gitSHA and id are structural and always present; the requested fields select which properties appear on each entry.
(fields []string)
| 104 | // gitSHA and id are structural and always present; the requested fields select |
| 105 | // which properties appear on each entry. |
| 106 | func (d *repoDir) ExportData(fields []string) map[string]any { |
| 107 | entries := make([]any, 0, len(d.Entries)) |
| 108 | for _, e := range d.Entries { |
| 109 | entries = append(entries, e.ExportData(fields)) |
| 110 | } |
| 111 | return map[string]any{ |
| 112 | "gitSHA": d.GitSHA, |
| 113 | "id": d.ID, |
| 114 | "entries": entries, |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | // fetchTree resolves a directory listing for dirPath at ref. |
| 119 | // |
nothing calls this directly
no test coverage detected