[!exec:git] skip 'git not found in $PATH'

mkgitconfig
mkhomedir golden
mkhomedir

chezmoi init

# test that chezmoi add creates and pushes a commit
chezmoi add $HOME${/}.file
exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD
stdout 'Add dot_file'

# test that chezmoi edit creates and pushes a commit
chezmoi edit $HOME${/}.file
exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD
stdout 'Update dot_file'

# test that chezmoi forget creates and pushes a commit
chezmoi forget --force $HOME${/}.file
exec git --git-dir=$CHEZMOISOURCEDIR/.git show HEAD
stdout 'Remove dot_file'

-- home/user/.config/chezmoi/chezmoi.toml --
[git]
    autoCommit = true
