From 4fd80ee6de27de3364c339483d392f5fcc662780 Mon Sep 17 00:00:00 2001 From: stormdragon2976 Date: Wed, 5 Apr 2023 15:57:36 -0400 Subject: [PATCH] Fixed a bug that was causing git pushes of notes to fail. --- notestorm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/notestorm b/notestorm index 8de6948..7027f02 100755 --- a/notestorm +++ b/notestorm @@ -109,8 +109,8 @@ add_note() { if [ -f "${xdgPath}/notestorm/notes/${noteName}.md" ]; then infobox "Note added." if [[ -d "$xdgPath/notestorm/notes/.git" ]]; then - { git -C "$xdgPath/notestorm/notes" add -A - git -C "$xdgPath/notestorm/notes" commit -m "$(*gettext "Automatic push from notestorm, note added.")" + { git -C "$xdgPath/notestorm/notes" add -A :/ + git -C "$xdgPath/notestorm/notes" commit -m "$(gettext "Automatic push from notestorm, note added.")" git -C "$xdgPath/notestorm/notes" push ; } | dialog --progressbox "$(gettext "Pushing to git...")" -1 -1 fi else @@ -140,7 +140,7 @@ delete_note() { infobox "$(gettext "Note deleted.")" if [[ -d "$xdgPath/notestorm/notes/.git" ]]; then { git -C "$xdgPath/notestorm/notes" rm -f "$1" - git -C "$xdgPath/notestorm/notes" commit -m "$(*gettext "Automatic push from notestorm, note deleted.")" + git -C "$xdgPath/notestorm/notes" commit -m "$(gettext "Automatic push from notestorm, note deleted.")" git -C "$xdgPath/notestorm/notes" push ; } | dialog --progressbox "$(gettext "Pushing to git...")" -1 -1 fi else @@ -173,8 +173,8 @@ edit_note() { if [ "$oldMd5" != "$newMd5" ]; then infobox "$(gettext "Changes saved.")" if [[ -d "$xdgPath/notestorm/notes/.git" ]]; then - { git -C "$xdgPath/notestorm/notes" add -A - git -C "$xdgPath/notestorm/notes" commit -m "$(*gettext "Automatic push from notestorm, note updated.")" + { git -C "$xdgPath/notestorm/notes" add -A :/ + git -C "$xdgPath/notestorm/notes" commit -m "$(gettext "Automatic push from notestorm, note updated.")" git -C "$xdgPath/notestorm/notes" push ; } | dialog --progressbox "$(gettext "Pushing to git...")" -1 -1 fi else @@ -198,9 +198,9 @@ encrypt_note() { rm -f "$1" infobox "$(gettext "Note encrypted.")" if [[ -d "$xdgPath/notestorm/notes/.git" ]]; then - { git -C "$xdgPath/notestorm/notes" add -A + { git -C "$xdgPath/notestorm/notes" add -A :/ git rm -f "$1" - git -C "$xdgPath/notestorm/notes" commit -m "$(*gettext "Automatic push from notestorm, note encrypted.")" + git -C "$xdgPath/notestorm/notes" commit -m "$(gettext "Automatic push from notestorm, note encrypted.")" git -C "$xdgPath/notestorm/notes" push ; } | dialog --progressbox "$(gettext "Pushing to git...")" -1 -1 fi return