diff --git a/lib/git.zsh b/lib/git.zsh index b1d7693..4152ff0 100755 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -152,7 +152,7 @@ function git_commits_from() { } function git_reset_branch_commits() { - git reset $(git merge-base $1 $(git branch --show-current)) + git reset $(git merge-base "$1" $(git branch --show-current)) } function git_uncommit() { @@ -161,15 +161,16 @@ function git_uncommit() { } function git_show_branch_filter() { - git show $(g log --pretty=format:"%h %an %ad %s" origin/HEAD..HEAD |filter|cut -d ' ' -f 1 |xargs) + git show $(g log --pretty=format:"%h %an %as %s" origin/HEAD..HEAD |fzf --reverse --height 40%|cut -d ' ' -f 1 |xargs) } function git_show_filter() { - git show $(g log --pretty=format:"%h %an %ad %s" |filter|cut -d ' ' -f 1 |xargs) + git show $(g log --pretty=format:"%h %an %as %s" |fzf --reverse --height 40%|cut -d ' ' -f 1 |xargs) } function git_fixup() { - git commit "$1" --fixup $(g log --pretty=format:"%h %an %ad %s" origin/HEAD..HEAD |filter|cut -d ' ' -f 1 |xargs) + #git commit "$1" --fixup $(g log --pretty=format:"%h %an %ad %s" origin/HEAD..HEAD |filter|cut -d ' ' -f 1 |xargs) + git commit "$@" --fixup $(g log --pretty=format:"%h %an %ad %s" --reverse origin/HEAD..HEAD |fzf --reverse --height 40%|cut -d ' ' -f 1 |xargs) } #this is unlikely to change so make it all statically assigned