fix: home git push

feat: add hdiff1 alias
This commit is contained in:
2024-05-05 00:09:22 +03:00
parent 76ba372e95
commit 619a62fa7a
3 changed files with 8 additions and 5 deletions

View File

@@ -1,14 +1,16 @@
return {
"chenasraf/text-transform.nvim",
version = "*",
-- dir = "~/Dev/text-transform.nvim",
branch = "develop",
-- version = "*",
dir = "~/Dev/text-transform.nvim",
opts = {
debug = false,
-- debug = true,
keymap = {
telescope_popup = {
["n"] = "<Leader>~",
["v"] = "<Leader>~",
}
},
},
-- popup_type = 'select',
},
}

View File

@@ -103,6 +103,7 @@ alias hst="home status"
alias hlg="lg -p \$HOME/.dotfiles"
alias hg="home git"
alias hdiff="home git diff"
alias hdiff1="home git diff HEAD~1"
alias hf="home fetch"
alias hp="home push"
alias hl="home pull"

View File

@@ -47,7 +47,7 @@ export const gitCommand = createGitCommand<GitOpts>(
export const pushCommand = new MassargCommand<PushOpts>({
name: 'push',
run: async (opts) => {
const code = await runCommand(opts, `git -C ${DF_DIR} diff --quiet`)
const code = await runCommand(opts, `git -C ${DF_DIR} diff --quiet`).catch((code) => code)
if (code !== 0) {
await runCommand(opts, `git -C ${DF_DIR} add .`)
await runCommand(