From 225a17c43703261f8efef25b9572f6a3cd89ae2c Mon Sep 17 00:00:00 2001 From: druckdev Date: Thu, 18 Nov 2021 04:06:54 +0100 Subject: [PATCH] git:alias:track: Get rid of function definition The function definition in the spull alias is only needed for the processing of arguments. In `track`s case it is completely unnecessary. --- .config/git/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/git/config b/.config/git/config index 6d5622e..e40077d 100644 --- a/.config/git/config +++ b/.config/git/config @@ -16,7 +16,7 @@ [alias] root = rev-parse --show-toplevel spull = "!__git_spull() { git pull \"$@\" && git submodule sync --recursive && git submodule update --init --recursive; }; __git_spull" - track = "!track() { git for-each-ref --format='%(upstream),%(refname)' refs/heads refs/remotes | sort -d | sed -E 's:(^|,)refs/(heads|remotes/):\\1:g; s:^,([^/].*):\\1,:; s:,/:,:' | sed -Ez 's:(^|\\n)([^,]+),\\n\\2:\\1\\2:g; s:(^|\\n)([^/,]*)([^\\n]*\\n\\2(,|/))*:\\n&:g; s:\\n+$:\\n:' | (echo remote,local; cat) | column -tdLs, -Na,b -Ob,a; }; track" + track = "!git for-each-ref --format='%(upstream),%(refname)' refs/heads refs/remotes | sort -d | sed -E 's:(^|,)refs/(heads|remotes/):\\1:g; s:^,([^/].*):\\1,:; s:,/:,:' | sed -Ez 's:(^|\\n)([^,]+),\\n\\2:\\1\\2:g; s:(^|\\n)([^/,]*)([^\\n]*\\n\\2(,|/))*:\\n&:g; s:\\n+$:\\n:' | (echo remote,local; cat) | column -tdLs, -Na,b -Ob,a" branches = track [status] submodulesummary = true