improve git-recent

Fri, 20 Sep 2019 00:42:43 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 20 Sep 2019 00:42:43 -0500
changeset 789
2d470b528b53
parent 788
f8da8d4ff16a
child 790
5ecabaf00ed2

improve git-recent

.gitconfig file | annotate | diff | comparison | revisions
--- a/.gitconfig
+++ b/.gitconfig
@@ -24,7 +24,7 @@
 	new      = "!git log --pretty=onelinecustom $1@{1}..$1@{0}"
 	cleanup  = "!git branch --merged | grep  -v '\\*\\|master\\|develop' | xargs -n 1 echo git branch -d"
 	glog     = log --graph --pretty=onelinecustom
-	recent   = !sh -c 'git for-each-ref --count=${1:-20} --sort=-committerdate --format=\"%(committerdate:short) %(refname:short)\" ${@:2}' -
+	recent   = "!f() { git for-each-ref --count=20 --sort=-committerdate --format=\"%(committerdate:short) %(refname:short)\" ${1:-refs/heads} ${@:2}; }; f"
 
 [branch]
 	autosetuprebase = always

mercurial