()
| 200 | } |
| 201 | |
| 202 | func (w *Worktree) getSubmodulesStatus() (map[string]plumbing.Hash, error) { |
| 203 | o := map[string]plumbing.Hash{} |
| 204 | |
| 205 | sub, err := w.Submodules() |
| 206 | if err != nil { |
| 207 | return nil, err |
| 208 | } |
| 209 | |
| 210 | status, err := sub.Status() |
| 211 | if err != nil { |
| 212 | return nil, err |
| 213 | } |
| 214 | |
| 215 | for _, s := range status { |
| 216 | if s.Current.IsZero() { |
| 217 | o[s.Path] = s.Expected |
| 218 | continue |
| 219 | } |
| 220 | |
| 221 | o[s.Path] = s.Current |
| 222 | } |
| 223 | |
| 224 | return o, nil |
| 225 | } |
| 226 | |
| 227 | func (w *Worktree) diffCommitWithStaging(commit plumbing.Hash, reverse bool) (merkletrie.Changes, error) { |
| 228 | var t *object.Tree |
no test coverage detected