From 8c6bf3252e9521dde3957c635d4deb38600011ca Mon Sep 17 00:00:00 2001 From: Maxim Likhachev Date: Sun, 20 Oct 2019 00:59:30 +0500 Subject: [PATCH] git: ++forks --- etc/soft/git/gitconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/soft/git/gitconfig b/etc/soft/git/gitconfig index 6e01f5a..40fc149 100644 --- a/etc/soft/git/gitconfig +++ b/etc/soft/git/gitconfig @@ -56,11 +56,11 @@ # Note how defining a function eliminates the need to use sh -c. graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '\n}'; }; f" - # http://gitboard.net - board = !gitboard 2>&- - url = !git remote -v | grep fetch | awk '{ print $2 }' + # The last forks of current or specified github repository + forks = "!f() { [ -z "$1" ] && forks $(git url | grep github.com | sed -e 's|^.*github.com/||' | sed 's/.git.*$//') || forks "$1"; }; f" + hub = "!github_clone() { git clone git://github.com/${1}.git; }; github_clone" nb = "!github_clone() { git clone https://notabug.org/${1}.git; }; github_clone"