summaryrefslogtreecommitdiff
path: root/doGit.go
diff options
context:
space:
mode:
Diffstat (limited to 'doGit.go')
-rw-r--r--doGit.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/doGit.go b/doGit.go
index 42d7de6..576562a 100644
--- a/doGit.go
+++ b/doGit.go
@@ -61,11 +61,14 @@ func doGit() (string, error) {
}
if argv.Git.Edit != "" {
- s = "changing the last commit message"
+ log.Info("change last git commit message to:", argv.Git.Edit)
+ cmd := []string{"git", "commit", "--amend", "-m", argv.Git.Edit}
+ s, err = runCommand(cmd)
}
if argv.Git.ChopHEAD != 0 {
- s, err = runCommand([]string{"git", "reset", "--hard", fmt.Sprintf("HEAD-%d", argv.Git.ChopHEAD)})
+ cmd := []string{"git", "reset", "--hard", fmt.Sprintf("HEAD-%d", argv.Git.ChopHEAD)}
+ s, err = runCommand(cmd)
}
if argv.Git.Tag != nil {