Modify some of the git functions to use fzf
This commit is contained in:
parent
e09ccf99d9
commit
521e4de26d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue