From 2c0cc6fbd72017ab347e54c3b552314f72b8a337 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Sat, 21 Jan 2017 08:25:30 -0800 Subject: [PATCH] [tools] zmanage update: track submodules This change causes `zmanage update` to track the submodules as described in origin/master, not from their upstream (dirty) states. Users wishing to "revert" this change on occasion to test some upstream submodule features, do: `cd ~/.zim && gSu`, assuming you have the git aliases. This will pull the upstream modules to their latest state, leaving a dirty HEAD state with these untracked modules. `cd ~/.zim && gSI` to revert. Closes #127 --- tools/zim_update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/zim_update b/tools/zim_update index ec422f0..5f3f73e 100644 --- a/tools/zim_update +++ b/tools/zim_update @@ -4,8 +4,8 @@ cd ${ZDOTDIR:-${HOME}/.zim} -# this is the cleanest way I know of to update a repository +# this is the cleanest way I know how to update a repository git remote update -p git merge --ff-only @\{u\} # and update the submodules -git submodule foreach --quiet --recursive git pull origin master +git submodule update --init --recursive