summaryrefslogtreecommitdiff
path: root/doGit.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-17 01:52:26 -0500
committerJeff Carr <[email protected]>2025-10-17 01:52:26 -0500
commit24314902af09fb3fb111f451d02fe162accd15b1 (patch)
tree9168ada5ff76b67af1783ac3925ddb30256cc4c9 /doGit.go
parent415ff4cf1905526b727623a92354b99fb9304c83 (diff)
shortcuts
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 {