getIsCommitMap returns a mapping of all the annotated objects that are commits.
(repo *GitRepo)
| 843 | |
| 844 | // getIsCommitMap returns a mapping of all the annotated objects that are commits. |
| 845 | func (overview *notesOverview) getIsCommitMap(repo *GitRepo) (map[string]bool, error) { |
| 846 | var stdout bytes.Buffer |
| 847 | var stderr bytes.Buffer |
| 848 | if err := repo.runGitCommandWithIO(overview.ObjectHashesReader, &stdout, &stderr, "cat-file", "--batch-check=%(objectname) %(objecttype)"); err != nil { |
| 849 | return nil, fmt.Errorf("Failure performing a batch file check: %v", err) |
| 850 | } |
| 851 | isCommit, err := splitBatchCheckOutput(&stdout) |
| 852 | if err != nil { |
| 853 | return nil, fmt.Errorf("Failure parsing the output of a batch file check: %v", err) |
| 854 | } |
| 855 | return isCommit, nil |
| 856 | } |
| 857 | |
| 858 | // getNoteContentsMap returns a mapping from all the notes hashes to their contents. |
| 859 | func (overview *notesOverview) getNoteContentsMap(repo *GitRepo) (map[string][]byte, error) { |
no test coverage detected