diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-10-02 10:32:45 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-10-16 11:28:26 -0500 |
commit | 2c5cdc4d3e479576f13e4307f0be1c6170e34756 (patch) | |
tree | 69dcf6f113df222454c90e848fcce53ca069dfe9 /g | |
parent | 942a8ffd255e64a018a9c4d66b8524dd5e6df01c (diff) |
when switching to a pre-submodule point, clean-up the soft-link point
Change-Id: I5a8f144bb4ad167cfa0e6763e3cf273b9127d65b
Diffstat (limited to 'g')
-rwxr-xr-x | g | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -137,6 +137,7 @@ do_checkout() local cmd local create_branch="0" local branch +local module git checkout "$@" || return $? for cmd in "$@" ; do @@ -154,6 +155,11 @@ local branch fi else # now that is the nasty case we moved prior to submodules + # delete the submodules left over if any + for module in $SUBMODULES_ALL ; do + echo "clean-up submodule $module" + rm -fr ${module} + done # make sure we have the needed repo in clone ./g clone && ./g -f checkout "$@" || return $? fi @@ -167,6 +173,11 @@ do_reset() git submodule update || return $? else # now that is the nasty case we moved prior to submodules + # delete the submodules left over if any + for module in $SUBMODULES_ALL ; do + echo "clean-up submodule $module" + rm -fr ${module} + done # make sure we have the needed repo in clone ./g clone && ./g -f reset "$@" fi |