summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2016-02-28 20:45:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2016-02-28 20:45:28 -0700
commit33118fdd968c7b0f3cd8e6b876ffb748f5be7dfd (patch)
tree95aa2fd4ba04e98e1d955fbc79e0106f57fd081a
parentb11f97bc4a8ea1183dc9d6d326af6d95eb76ca22 (diff)
downloaddotfiles-33118fdd968c7b0f3cd8e6b876ffb748f5be7dfd.tar.gz
mr isclean
-rwxr-xr-xbin/weekly-backups5
-rw-r--r--home-mrconfig5
2 files changed, 9 insertions, 1 deletions
diff --git a/bin/weekly-backups b/bin/weekly-backups
index dc1adcd1..a4b4cce4 100755
--- a/bin/weekly-backups
+++ b/bin/weekly-backups
@@ -41,9 +41,12 @@ status "move these into the relevant stow'd repository"
try mr -ms restow
try mr -ms autoci
-zero mr -ms status
+# `mr -ms isclean` checks for stuff to be checked in ...
+zero mr -ms isclean
try mr -ms up
try mr -ms push origin --tags :
+# ... then `mr -ms status` finds unpushed branches
+zero mr -ms status
try coldbkup
try sudo apt-get update
diff --git a/home-mrconfig b/home-mrconfig
index 20b4adc8..1377ce49 100644
--- a/home-mrconfig
+++ b/home-mrconfig
@@ -17,6 +17,10 @@ git_autoci = :
# In general, I don't want merge commits to be made en masse by mr
git_update = git remote update; git pull --ff-only "$@"
+# `mr -ms status` is a great way to check for unpushed branches and
+# unchecked in files, but what about checking only for the latter?
+git_isclean = git diff-index --quiet --cached HEAD && git diff-files --quiet || git status --porcelain
+
# --- Adam Spiers' plugin for managing dotfile symlinks with mr
include =
@@ -372,6 +376,7 @@ skip = ! mine
checkout = git clone swhitton@athena.silentflame.com:lib/dionysus
status = git annex status
sync = git annex sync --content
+isclean = test -z $(git annex status)
# setup not yet solidified
skip = lazy