Skip to content

Commit e501893

Browse files
committed
Fix gcsm alias passing the commit message as a path
`gcsm` expanded to `git commit --all --signoff $message`, which hands the message to git as a pathspec, so it fails with "pathspec did not match" (or commits unrelated files if a file happens to share the name). It should mirror `gcasm` minus the `--all`, as in oh-my-zsh: alias gcsm='git commit --signoff --message' Also add `gcsm` to the abbreviation file, which mirrored every other alias in this file except this one.
1 parent e055e4c commit e501893

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎abbreviations/git/git-abbreviations.nu‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const git_abbreviations = {
5858
gcav!: "git commit --all --verbose --no-verify --amend"
5959
gcfx: "git commit --fixup"
6060
gcv: "git commit --verbose --no-verify"
61+
gcsm: "git commit --signoff --message"
6162
gcb: "git checkout -b"
6263
gcd: "git checkout develop"
6364
gcf: "git config --list"

‎aliases/git/git-aliases.nu‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export def gcam [message: string] {
5656
git commit --all --message $message
5757
}
5858
export def gcsm [message: string] {
59-
git commit --all --signoff $message
59+
git commit --signoff --message $message
6060
}
6161
export alias gcas = git commit --all --signoff
6262
export def gcasm [message: string] {

0 commit comments

Comments
 (0)