(r io.Reader)
| 284 | } |
| 285 | |
| 286 | func HashObject(r io.Reader) (string, error) { |
| 287 | cmd, err := gitNoLFS("hash-object", "--stdin") |
| 288 | if err != nil { |
| 289 | return "", errors.New(tr.Tr.Get("failed to find `git hash-object`: %v", err)) |
| 290 | } |
| 291 | cmd.Stdin = r |
| 292 | out, err := cmd.Output() |
| 293 | if err != nil { |
| 294 | return "", errors.New(tr.Tr.Get("error building Git blob OID: %s", err)) |
| 295 | } |
| 296 | |
| 297 | return string(bytes.TrimSpace(out)), nil |
| 298 | } |
| 299 | |
| 300 | func Log(args ...string) (*subprocess.BufferedCmd, error) { |
| 301 | logArgs := append([]string{"log"}, args...) |
no test coverage detected