remove command-t
This commit is contained in:
parent
af5e03d6c1
commit
cf67c85370
3 changed files with 33 additions and 4 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -28,9 +28,6 @@
|
||||||
[submodule ".vim/bundle/nerdcommenter"]
|
[submodule ".vim/bundle/nerdcommenter"]
|
||||||
path = .vim/bundle/nerdcommenter
|
path = .vim/bundle/nerdcommenter
|
||||||
url = git://github.com/scrooloose/nerdcommenter.git
|
url = git://github.com/scrooloose/nerdcommenter.git
|
||||||
[submodule ".vim/bundle/command-t"]
|
|
||||||
path = .vim/bundle/command-t
|
|
||||||
url = git://git.wincent.com/command-t.git
|
|
||||||
[submodule ".vim/bundle/EasyGrep"]
|
[submodule ".vim/bundle/EasyGrep"]
|
||||||
path = .vim/bundle/EasyGrep
|
path = .vim/bundle/EasyGrep
|
||||||
url = https://github.com/vim-scripts/EasyGrep.git
|
url = https://github.com/vim-scripts/EasyGrep.git
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 8866bbc0e18a981889b3431790caf47432f38cf4
|
|
||||||
33
bin/git-remove-submodule
Executable file
33
bin/git-remove-submodule
Executable file
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Adam Sharp
|
||||||
|
# Aug 21, 2013
|
||||||
|
#
|
||||||
|
# Usage: Add it to your PATH and `git remove-submodule path/to/submodule`.
|
||||||
|
#
|
||||||
|
# Does the inverse of `git submodule add`:
|
||||||
|
# 1) `deinit` the submodule
|
||||||
|
# 2) Remove the submodule from the index and working directory
|
||||||
|
# 3) Clean up the .gitmodules file
|
||||||
|
#
|
||||||
|
|
||||||
|
submodule_name=$1; shift
|
||||||
|
|
||||||
|
exit_err() {
|
||||||
|
[ $# -gt 0 ] && echo "fatal: $*" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if git submodule status "$submodule_name" >/dev/null 2>&1; then
|
||||||
|
git submodule deinit -f "$submodule_name"
|
||||||
|
git rm -f "$submodule_name"
|
||||||
|
|
||||||
|
git config -f .gitmodules --remove-section "submodule.$submodule_name"
|
||||||
|
if [ -z "$(cat .gitmodules)" ]; then
|
||||||
|
git rm -f .gitmodules
|
||||||
|
else
|
||||||
|
git add .gitmodules
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit_err "Submodule '$submodule_name' not found"
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue