|
|
@ -172,7 +172,13 @@ func (g *GoGit) Commit(message git.Commit, opts ...git.Option) (string, error) {
|
|
|
|
// modified. There's no circumstance in which we want to commit a
|
|
|
|
// modified. There's no circumstance in which we want to commit a
|
|
|
|
// change to a broken symlink: so, detect and skip those.
|
|
|
|
// change to a broken symlink: so, detect and skip those.
|
|
|
|
var changed bool
|
|
|
|
var changed bool
|
|
|
|
for file, _ := range status {
|
|
|
|
for file, fileStatus := range status {
|
|
|
|
|
|
|
|
if fileStatus.Staging == gogit.Deleted {
|
|
|
|
|
|
|
|
_, _ = wt.Add(file)
|
|
|
|
|
|
|
|
changed = true
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
abspath := filepath.Join(g.path, file)
|
|
|
|
abspath := filepath.Join(g.path, file)
|
|
|
|
info, err := os.Lstat(abspath)
|
|
|
|
info, err := os.Lstat(abspath)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|