()
| 183 | } |
| 184 | |
| 185 | func (w *Worktree) getSubmodulesStatus() (map[string]plumbing.Hash, error) { |
| 186 | o := map[string]plumbing.Hash{} |
| 187 | |
| 188 | sub, err := w.Submodules() |
| 189 | if err != nil { |
| 190 | return nil, err |
| 191 | } |
| 192 | |
| 193 | status, err := sub.Status() |
| 194 | if err != nil { |
| 195 | return nil, err |
| 196 | } |
| 197 | |
| 198 | for _, s := range status { |
| 199 | if s.Current.IsZero() { |
| 200 | o[s.Path] = s.Expected |
| 201 | continue |
| 202 | } |
| 203 | |
| 204 | o[s.Path] = s.Current |
| 205 | } |
| 206 | |
| 207 | return o, nil |
| 208 | } |
| 209 | |
| 210 | func (w *Worktree) diffCommitWithStaging(commit plumbing.Hash, reverse bool) (merkletrie.Changes, error) { |
| 211 | var t *object.Tree |
no test coverage detected