danix
's git repository
home
/
my projects
/
bash-notes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d1f115c
)
if PLAIN option is enabled, git pull doesn't emit output.
author
danix
<danix@danix.xyz>
Tue, 18 Apr 2023 07:11:37 +0000
(09:11 +0200)
committer
danix
<danix@danix.xyz>
Tue, 18 Apr 2023 07:11:37 +0000
(09:11 +0200)
SOURCE/CORE/git.sh
patch
|
blob
|
blame
|
history
notes.sh
patch
|
blob
|
blame
|
history
diff --git
a/SOURCE/CORE/git.sh
b/SOURCE/CORE/git.sh
index
ff674df
..
3ddec6c
100644
(file)
--- a/
SOURCE/CORE/git.sh
+++ b/
SOURCE/CORE/git.sh
@@
-26,7
+26,7
@@
gitsync() {
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
- $GIT pull
+ [ $PLAIN == false ] && $GIT pull || $GIT pull -q
else
# LASTSYNC is the last time we synced to the remote, or 0 if it's the first time.
LASTSYNC=$($JQ -r '.git["lastpull"] // 0' "$DB")
else
# LASTSYNC is the last time we synced to the remote, or 0 if it's the first time.
LASTSYNC=$($JQ -r '.git["lastpull"] // 0' "$DB")
@@
-36,7
+36,7
@@
gitsync() {
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
- $GIT pull
+ [ $PLAIN == false ] && $GIT pull || $GIT pull -q
else
# Last synced less than $GITSYNCDELAY seconds ago. We shall wait
[ $PLAIN == false ] && echo "Last synced less than $GITSYNCDELAY seconds ago. We shall wait"
else
# Last synced less than $GITSYNCDELAY seconds ago. We shall wait
[ $PLAIN == false ] && echo "Last synced less than $GITSYNCDELAY seconds ago. We shall wait"
diff --git
a/notes.sh
b/notes.sh
index
687fefe
..
089daca
100755
(executable)
--- a/
notes.sh
+++ b/
notes.sh
@@
-268,7
+268,7
@@
gitsync() {
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
- $GIT pull
+ [ $PLAIN == false ] && $GIT pull || $GIT pull -q
else
# LASTSYNC is the last time we synced to the remote, or 0 if it's the first time.
LASTSYNC=$($JQ -r '.git["lastpull"] // 0' "$DB")
else
# LASTSYNC is the last time we synced to the remote, or 0 if it's the first time.
LASTSYNC=$($JQ -r '.git["lastpull"] // 0' "$DB")
@@
-278,7
+278,7
@@
gitsync() {
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
$JQ --arg n "$NOWSYNC" '.git["lastpull"] = $n' "$DB" > $TMPDB
mv $TMPDB $DB
cd $BASEDIR
- $GIT pull
+ [ $PLAIN == false ] && $GIT pull || $GIT pull -q
else
# Last synced less than $GITSYNCDELAY seconds ago. We shall wait
[ $PLAIN == false ] && echo "Last synced less than $GITSYNCDELAY seconds ago. We shall wait"
else
# Last synced less than $GITSYNCDELAY seconds ago. We shall wait
[ $PLAIN == false ] && echo "Last synced less than $GITSYNCDELAY seconds ago. We shall wait"