improve gitfetcher/lister and add pretty overview log
This commit is contained in:
parent
97e8eb2320
commit
0e721f7973
@ -16,3 +16,4 @@
|
||||
gpgsign = true
|
||||
[alias]
|
||||
pushf = push --force-with-lease
|
||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||
|
@ -2,16 +2,23 @@
|
||||
|
||||
wd="$(pwd)"
|
||||
temp="$(mktemp)"
|
||||
name="$(basename "$0")"
|
||||
|
||||
find /data -name '.git' -exec dirname \{\} \; | while read gitrepo; do
|
||||
cd "$gitrepo"
|
||||
case "$name" in
|
||||
"gitfetcher")
|
||||
echo "$gitrepo"
|
||||
|
||||
git remote | while read remote; do
|
||||
git fetch --prune "$remote"
|
||||
done 2>&1 | sed 's/^/ /'
|
||||
|
||||
git status | grep behind | sed 's/^/ /'
|
||||
;;
|
||||
"gitlister")
|
||||
if git status | grep -q behind; then
|
||||
echo "$gitrepo"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
cd "$wd"
|
||||
|
1
local/bin/gitlister
Symbolic link
1
local/bin/gitlister
Symbolic link
@ -0,0 +1 @@
|
||||
gitfetcher
|
Loading…
Reference in New Issue
Block a user