.sh

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

commit fb9d70bd1ba5de1313eefdfe73b55dc5479fcc18
parent 053aec1b54d2049724b10acc38cfcda307bb3cd0
Author: Byron Torres <b@torresjrjr.com>
Date:   Thu, 15 Jul 2021 00:07:55 +0100

New gitlf(), remove '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 $2 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