fix: 🐛 fixed failed error message on non changes
This commit is contained in:
5
git.go
5
git.go
@@ -87,9 +87,10 @@ func GitPull(cfg *Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GitStatusChanged reports true when the working tree has uncommitted changes.
|
||||
// GitStatusChanged reports true when there are changes in the machine-managed
|
||||
// dynamic directory. Unrelated repository changes are intentionally ignored.
|
||||
func GitStatusChanged(cfg *Config) (bool, error) {
|
||||
out, err := gitOutput(cfg, "status", "--porcelain")
|
||||
out, err := gitOutput(cfg, "status", "--porcelain", "--", cfg.DynamicDir)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user