Re: [PATCH v2] submodule: add 'deinit' command
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 4, 2012, 23:06 UTC
- Message-ID
- <7v1uf5mn74.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <50BE6FB9.70301@web.de>
Jens Lehmann <Jens.Lehmann@web.de> 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.
Show 6 quoted lines
> +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.
Show 6 quoted lines
> +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.