aboutsummaryrefslogtreecommitdiff
path: root/lib/subcommands
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-03-08 08:58:33 +0100
committerPatrick Spek <p.spek@tyil.nl>2023-03-08 08:58:33 +0100
commite4a5cb6416a8908a65e274cd00f7ea04f5094d77 (patch)
treec1f2a303e1e9c7a8e31d218866bd745addc78b34 /lib/subcommands
parente777cbc1cb10da93cb257305b05a6bba54307813 (diff)
Stash and pop changes when syncing
Diffstat (limited to 'lib/subcommands')
-rw-r--r--lib/subcommands/sync.bash4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/subcommands/sync.bash b/lib/subcommands/sync.bash
index 0413ce4..ed03faa 100644
--- a/lib/subcommands/sync.bash
+++ b/lib/subcommands/sync.bash
@@ -17,8 +17,12 @@ subcommand()
notice "bashtard/sync" "Syncing $BASHTARD_ETCDIR"
pushd -- "$BASHTARD_ETCDIR" > /dev/null || return 4
+
+ git stash
git pull origin master || return 4
git submodule update --recursive --remote || return 4
+ git stash pop
+
popd > /dev/null || return 4
# Run a sync for each registered playbook for this host