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 { function pushdot {
cd "$DOT_DIR" || return 1 cd "$DOT_DIR" || return 1
local res local res
if [ $# -eq 0 ]; then if ! git diff --quiet; then
git commit -a if [ $# -eq 0 ]; then
res="$?" git commit -a
else res="$?"
git commit -a -m "$@" else
res="$?" git commit -a -m "$@"
fi res="$?"
if [[ "$res" == "0" ]]; then fi
git push -u origin main if [[ "$res" == "0" ]]; then
push-extensions git push -u origin main
sync-history fi
push-dconf
fi fi
push-extensions
sync-history
push-dconf
cd - cd -
return $res return $res
} }