Perform sync even pushdot has no changes to commit

This commit is contained in:
Sage Vaillancourt 2024-03-08 19:12:03 -05:00
parent d9a74c9503
commit 4a529f742d
1 changed files with 14 additions and 12 deletions

View File

@ -170,19 +170,21 @@ function load-extensions {
function pushdot {
cd "$DOT_DIR" || return 1
local res
if [ $# -eq 0 ]; then
git commit -a
res="$?"
else
git commit -a -m "$@"
res="$?"
fi
if [[ "$res" == "0" ]]; then
git push -u origin main
push-extensions
sync-history
push-dconf
if ! git diff --quiet; then
if [ $# -eq 0 ]; then
git commit -a
res="$?"
else
git commit -a -m "$@"
res="$?"
fi
if [[ "$res" == "0" ]]; then
git push -u origin main
fi
fi
push-extensions
sync-history
push-dconf
cd -
return $res
}