improve gitfetcher/lister and add pretty overview log
This commit is contained in:
parent
97e8eb2320
commit
0e721f7973
@ -16,3 +16,4 @@
|
|||||||
gpgsign = true
|
gpgsign = true
|
||||||
[alias]
|
[alias]
|
||||||
pushf = push --force-with-lease
|
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)"
|
wd="$(pwd)"
|
||||||
temp="$(mktemp)"
|
temp="$(mktemp)"
|
||||||
|
name="$(basename "$0")"
|
||||||
|
|
||||||
find /data -name '.git' -exec dirname \{\} \; | while read gitrepo; do
|
find /data -name '.git' -exec dirname \{\} \; | while read gitrepo; do
|
||||||
cd "$gitrepo"
|
cd "$gitrepo"
|
||||||
echo "$gitrepo"
|
case "$name" in
|
||||||
|
"gitfetcher")
|
||||||
git remote | while read remote; do
|
echo "$gitrepo"
|
||||||
git fetch --prune "$remote"
|
git remote | while read remote; do
|
||||||
done 2>&1 | sed 's/^/ /'
|
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
|
done
|
||||||
|
|
||||||
cd "$wd"
|
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