commit 45ce018e43540eb0268b4f414ac8ac98a822baec
parent 85bfec7a1011857ca4a78e7bb7ed8dfa9a4d046d
Author: lash <dev@holbrook.no>
Date: Fri, 14 Jan 2022 16:03:37 +0000
Remove remaining spam from gitrefresh
Diffstat:
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/gitrefresh.sh b/gitrefresh.sh
@@ -37,18 +37,22 @@ esac
repo_update() {
#>&2 echo updating `pwd`
- git remote update > /dev/null
-# if [ "$?" == "0" ]; then
+ git remote update > /dev/null
+ if [ "$?" == "0" ]; then
# if [[ $remote =~ ^git ]]; then
# ...
# fi
# sed -e "s/^.*:\(.*\)$/\1/g"
-# fi
- git fetch > /dev/null
+ return 1
+ fi
+ git fetch > /dev/null
+ if [ "$?" == "0" ]; then
+ return 1
+ fi
if [ ! -z "$_pull" ]; then
#branch=`git branch --show-current`
branch=`git rev-parse --abbrev-ref HEAD`
- git pull --ff-only origin $branch > /dev/null
+ git pull --ff-only origin $branch > /dev/null 2>&1
fi
}
@@ -68,7 +72,7 @@ repo_init() {
}
scan() {
- echo entering $d parent $p
+ #echo entering $d parent $p
pushd "$d" > /dev/null
if [ "$?" -ne "0" ]; then
p=`dirname $p`
@@ -92,7 +96,7 @@ scan() {
fi
popd > /dev/null
p=`dirname $p`
- echo exiting, parent now $p
+ #echo exiting, parent now $p
}
pushd $wd