From: Junio C Hamano Date: Tue, 04 Dec 2012 23:06:55 GMT Subject: Re: [PATCH v2] submodule: add 'deinit' command Message-ID: <7v1uf5mn74.fsf@alter.siamese.dyndns.org> In-Reply-To: <50BE6FB9.70301@web.de> Jens Lehmann writes: > +If you only want to remove the local checkout of a submodule from your > +work tree without committing that use `git submodule deinit` instead > +(see linkgit:git-submodule[1]). I'll add a comma between "without commiting that" and "use X instead"; it will read better, I think. > +test_expect_success 'submodule deinit should remove the whole submodule section from .git/config' ' > + git config submodule.example.foo bar && > + git submodule deinit && > + test -z "$(git config submodule.example.url)" && > + test -z "$(git config submodule.example.foo)" > +' This is sufficient, but it might be cleaner to see if git config --get-regexp "^submodule\.example\." results in empty. Does not make much difference to warrant a re-roll. > +test_expect_success 'submodule deinit complains only when explicitly used on an uninitialized submodule' ' > + git submodule deinit && > + test_must_fail git submodule deinit example > +' > + > test_done Thanks; will queue.