.sh

Multi-shell dotfiles manager
git clone https://git.torresjrjr.com/.sh.git
Log | Files | Refs | README | LICENSE

commit 2561407ed5182f0e7e072a051c84655a7478b490
parent 053aec1b54d2049724b10acc38cfcda307bb3cd0
Author: Byron Torres <b@torresjrjr.com>
Date:   Wed, 14 Jul 2021 23:35:23 +0100

New gitlf() from 'gitlf', improved gitf()

Diffstat:
Msh/.rc.sh | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/sh/.rc.sh b/sh/.rc.sh @@ -34,8 +34,6 @@ alias gitd='git diff' alias gitds='git diff --staged' alias gitl='git log --oneline --decorate --graph --all -10' alias gitll='git log --oneline --decorate --graph --all' -alias gitlf='git log --oneline --decorate --graph --color \ - HEAD origin/HEAD "$(git merge-base HEAD origin/HEAD)^!"' ## Functions @@ -53,13 +51,20 @@ info() { gitf() { echo ">>>" - git fetch + git fetch $1 echo "<<<" - gitlf + gitlf $1 $1 echo "---" git status } +gitlf() { + remote=${1:-origin} + branch=${2:-$(git branch | grep '^\*' | cut -d' ' -f2)} + git log --oneline --decorate --graph --color \ + "$branch" "$remote/$branch" \ + "$( git merge-base "$branch" "$remote/$branch" )^!" +} ## Local