IsWorkingCopyDirty returns true if and only if the working copy in which the command was executed is dirty as compared to the index. If the status of the working copy could not be determined, an error will be returned instead.
()
| 1653 | // If the status of the working copy could not be determined, an error will be |
| 1654 | // returned instead. |
| 1655 | func IsWorkingCopyDirty() (bool, error) { |
| 1656 | bare, err := IsBare() |
| 1657 | if bare || err != nil { |
| 1658 | return false, err |
| 1659 | } |
| 1660 | |
| 1661 | out, err := gitSimple("status", "--porcelain") |
| 1662 | if err != nil { |
| 1663 | return false, err |
| 1664 | } |
| 1665 | return len(out) != 0, nil |
| 1666 | } |
| 1667 | |
| 1668 | func ObjectDatabase(osEnv, gitEnv Environment, gitdir, tempdir string) (*gitobj.ObjectDatabase, error) { |
| 1669 | var options []gitobj.Option |
no test coverage detected