{"thread":{"id":"32842","subject":"What's cooking in git.git (Feb 2013, #03; Wed, 6)","startedAt":"2013-02-06T18:29:33Z","lastAt":"2013-02-06T19:39:29Z","messageCount":3,"participants":["Junio C Hamano","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"208840","messageId":"7v8v71cn3m.fsf@alter.siamese.dyndns.org","threadId":"32842","inReplyTo":null,"subject":"What's cooking in git.git (Feb 2013, #03; Wed, 6)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-02-06T18:29:33Z","receivedAt":"2013-02-06T18:29:33Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Here are the topics that have been cooking.  Commits prefixed with\n'-' are only in 'pu' (proposed updates) while commits prefixed with\n'+' are in 'next'.\n\nAs usual, this cycle is expected to last for 8 to 10 weeks, with a\npreview -rc0 sometime in the middle of this month.\n\nYou can find the changes described here in the integration branches of the\nrepositories listed at\n\n    http://git-blame.blogspot.com/p/git-public-repositories.html\n\n--------------------------------------------------\n[Graduated to \"master\"]\n\n* ft/transport-report-segv (2013-01-31) 1 commit\n  (merged to 'next' on 2013-02-02 at 6c450a7)\n + push: fix segfault when HEAD points nowhere\n\n A failure to push due to non-ff while on an unborn branch\n dereferenced a NULL pointer when showing an error message.\n\n\n* jc/fake-ancestor-with-non-blobs (2013-01-31) 3 commits\n  (merged to 'next' on 2013-02-02 at 86d457a)\n + apply: diagnose incomplete submodule object name better\n + apply: simplify build_fake_ancestor()\n + git-am: record full index line in the patch used while rebasing\n (this branch is used by jc/extended-fake-ancestor-for-gitlink.)\n\n Rebasing the history of superproject with change in the submodule\n has been broken since v1.7.12.\n\n\n* jn/auto-depend-workaround-buggy-ccache (2013-02-01) 1 commit\n  (merged to 'next' on 2013-02-02 at db5940a)\n + Makefile: explicitly set target name for autogenerated dependencies\n\n An age-old workaround to prevent buggy versions of ccache from\n breaking the auto-generation of dependencies, which unfortunately\n is still relevant because some people use ancient distros.\n\n\n* sb/gpg-plug-fd-leak (2013-01-31) 1 commit\n  (merged to 'next' on 2013-02-02 at c271a31)\n + gpg: close stderr once finished with it in verify_signed_buffer()\n\n We forgot to close the file descriptor reading from \"gpg\" output,\n killing \"git log --show-signature\" on a long history.\n\n\n* ta/doc-no-small-caps (2013-02-01) 6 commits\n  (merged to 'next' on 2013-02-02 at 77cbd0e)\n + Documentation: StGit is the right spelling, not StGIT\n + Documentation: describe the \"repository\" in repository-layout\n + Documentation: add a description for 'gitfile' to glossary\n + Documentation: do not use undefined terms git-dir and git-file\n + Documentation: the name of the system is 'Git', not 'git'\n + Documentation: avoid poor-man's small caps GIT\n\n Update documentation to change \"GIT\" which was a poor-man's small\n caps to \"Git\".  The latter was the intended spelling.\n\n Also change \"git\" spelled in all-lowercase to \"Git\" when it refers\n to the system as the whole or the concept it embodies, as opposed to\n the command the end users would type.\n\n--------------------------------------------------\n[New Topics]\n\n* jc/extended-fake-ancestor-for-gitlink (2013-02-05) 1 commit\n - apply: verify submodule commit object name better\n\n Instead of requiring the full 40-hex object names on the index\n line, we can read submodule commit object names from the textual\n diff when synthesizing a fake ancestore tree for \"git am -3\".\n\n Will merge to 'next'.\n\n\n* tz/credential-authinfo (2013-02-05) 1 commit\n - Add contrib/credentials/netrc with GPG support\n\n A new read-only credential helper (in contrib/) to interact with\n the .netrc/.authinfo files.  Hopefully mn/send-email-authinfo topic\n can rebuild on top of something like this.\n\n Waiting for further reviews.\n\n\n* jx/utf8-printf-width (2013-02-05) 1 commit\n - Add utf8_fprintf helper which returns correct columns\n\n Use a new helper that prints a message and counts its display width\n to align the help messages parse-options produces.\n\n--------------------------------------------------\n[Stalled]\n\n* mn/send-email-authinfo (2013-01-29) 1 commit\n - git-send-email: add ~/.authinfo parsing\n\n This triggered a subtopic to add a credential helper for\n authinfo/netrc files (with or without GPG encryption), but nobody\n seems to be working on connecting send-email to the credential\n framework.\n\n\n* mp/diff-algo-config (2013-01-16) 3 commits\n - diff: Introduce --diff-algorithm command line option\n - config: Introduce diff.algorithm variable\n - git-completion.bash: Autocomplete --minimal and --histogram for git-diff\n\n Add diff.algorithm configuration so that the user does not type\n \"diff --histogram\".\n\n Looking better; may want tests to protect it from future breakages,\n but otherwise it looks ready for 'next'.\n\n Expecting a follow-up to add tests.\n\n\n* mb/gitweb-highlight-link-target (2012-12-20) 1 commit\n - Highlight the link target line in Gitweb using CSS\n\n Expecting a reroll.\n $gmane/211935\n\n\n* jk/lua-hackery (2012-10-07) 6 commits\n - pretty: fix up one-off format_commit_message calls\n - Minimum compilation fixup\n - Makefile: make \"lua\" a bit more configurable\n - add a \"lua\" pretty format\n - add basic lua infrastructure\n - pretty: make some commit-parsing helpers more public\n\n Interesting exercise. When we do this for real, we probably would want\n to wrap a commit to make it more like an \"object\" with methods like\n \"parents\", etc.\n\n\n* rc/maint-complete-git-p4 (2012-09-24) 1 commit\n - Teach git-completion about git p4\n\n Comment from Pete will need to be addressed ($gmane/206172).\n\n\n* jc/maint-name-rev (2012-09-17) 7 commits\n - describe --contains: use \"name-rev --algorithm=weight\"\n - name-rev --algorithm=weight: tests and documentation\n - name-rev --algorithm=weight: cache the computed weight in notes\n - name-rev --algorithm=weight: trivial optimization\n - name-rev: --algorithm option\n - name_rev: clarify the logic to assign a new tip-name to a commit\n - name-rev: lose unnecessary typedef\n\n \"git name-rev\" names the given revision based on a ref that can be\n reached in the smallest number of steps from the rev, but that is\n not useful when the caller wants to know which tag is the oldest one\n that contains the rev.  This teaches a new mode to the command that\n uses the oldest ref among those which contain the rev.\n\n I am not sure if this is worth it; for one thing, even with the help\n from notes-cache, it seems to make the \"describe --contains\" even\n slower. Also the command will be unusably slow for a user who does\n not have a write access (hence unable to create or update the\n notes-cache).\n\n Stalled mostly due to lack of responses.\n\n\n* jc/xprm-generation (2012-09-14) 1 commit\n - test-generation: compute generation numbers and clock skews\n\n A toy to analyze how bad the clock skews are in histories of real\n world projects.\n\n Stalled mostly due to lack of responses.\n\n\n* jc/add-delete-default (2012-08-13) 1 commit\n - git add: notice removal of tracked paths by default\n\n \"git add dir/\" updated modified files and added new files, but does\n not notice removed files, which may be \"Huh?\" to some users.  They\n can of course use \"git add -A dir/\", but why should they?\n\n Resurrected from graveyard, as I thought it was a worthwhile thing\n to do in the longer term.\n\n Stalled mostly due to lack of responses.\n\n\n* mb/remote-default-nn-origin (2012-07-11) 6 commits\n - Teach get_default_remote to respect remote.default.\n - Test that plain \"git fetch\" uses remote.default when on a detached HEAD.\n - Teach clone to set remote.default.\n - Teach \"git remote\" about remote.default.\n - Teach remote.c about the remote.default configuration setting.\n - Rename remote.c's default_remote_name static variables.\n\n When the user does not specify what remote to interact with, we\n often attempt to use 'origin'.  This can now be customized via a\n configuration variable.\n\n Expecting a reroll.\n $gmane/210151\n\n \"The first remote becomes the default\" bit is better done as a\n separate step.\n\n\n* nd/parse-pathspec (2013-01-11) 20 commits\n . Convert more init_pathspec() to parse_pathspec()\n . Convert add_files_to_cache to take struct pathspec\n . Convert {read,fill}_directory to take struct pathspec\n . Convert refresh_index to take struct pathspec\n . Convert report_path_error to take struct pathspec\n . checkout: convert read_tree_some to take struct pathspec\n . Convert unmerge_cache to take struct pathspec\n . Convert read_cache_preload() to take struct pathspec\n . add: convert to use parse_pathspec\n . archive: convert to use parse_pathspec\n . ls-files: convert to use parse_pathspec\n . rm: convert to use parse_pathspec\n . checkout: convert to use parse_pathspec\n . rerere: convert to use parse_pathspec\n . status: convert to use parse_pathspec\n . commit: convert to use parse_pathspec\n . clean: convert to use parse_pathspec\n . Export parse_pathspec() and convert some get_pathspec() calls\n . Add parse_pathspec() that converts cmdline args to struct pathspec\n . pathspec: save the non-wildcard length part\n\n Uses the parsed pathspec structure in more places where we used to\n use the raw \"array of strings\" pathspec.\n\n Ejected from 'pu' for now; will take a look at the rerolled one\n later ($gmane/213340).\n\n--------------------------------------------------\n[Cooking]\n\n* dg/subtree-fixes (2013-02-05) 6 commits\n - contrib/subtree: make the manual directory if needed\n - contrib/subtree: honor DESTDIR\n - contrib/subtree: fix synopsis\n - contrib/subtree: better error handling for 'subtree add'\n - contrib/subtree: use %B for split subject/body\n - contrib/subtree: remove test number comments\n\n contrib/subtree updates, but here are only the ones that looked\n ready to be merged to 'next'.  For the remainder, they will have\n another day.\n\n Will merge to 'next'.\n\n\n* jl/submodule-deinit (2013-02-04) 1 commit\n - submodule: add 'deinit' command\n\n There was no Porcelain way to say \"I no longer am interested in\n this submodule\", once you express your interest in a submodule with\n \"submodule init\".  \"submodule deinit\" is the way to do so.\n\n Will merge to 'next'.\n\n\n* ct/autoconf-htmldir (2013-02-02) 1 commit\n  (merged to 'next' on 2013-02-05 at bba4f8c)\n + Honor configure's htmldir switch\n\n The autoconf subsystem passed --mandir down to generated\n config.mak.autogen but forgot to do the same for --htmldir.\n\n Will merge to 'master'.\n\n\n* mk/tcsh-complete-only-known-paths (2013-02-03) 1 commit\n  (merged to 'next' on 2013-02-05 at 4409b08)\n + completion: handle path completion and colon for tcsh script\n (this branch uses mp/complete-paths.)\n\n Manlio's \"complete with known paths only\" update to completion\n scripts returns directory names without trailing slash to\n compensate the addition of '/' done by bash that reads from our\n completion result.  tcsh completion code that reads from our\n internal completion result does not add '/', so let it ask our\n complletion code to keep the '/' at the end.\n\n Will merge to 'master'.\n\n\n* jc/combine-diff-many-parents (2013-02-05) 2 commits\n  (merged to 'next' on 2013-02-05 at e382aa6)\n + t4038: add tests for \"diff --cc --raw <trees>\"\n + combine-diff: lift 32-way limit of combined diff\n\n We used to have an arbitrary 32 limit for combined diff input,\n resulting in incorrect number of leading colons shown when showing\n the \"--raw --cc\" output.\n\n Will merge to 'master'.\n\n\n* jc/remove-export-from-config-mak-in (2013-02-03) 1 commit\n - config.mak.in: remove unused definitions\n\n config.mak.in template had an \"export\" line to cause a few\n common makefile variables to be exported; if they need to be\n expoted for autoconf/configure users, they should also be exported\n for people who write config.mak the same way.  Move the \"export\" to\n the main Makefile.\n\n\n* jk/apply-similaritly-parsing (2013-02-03) 1 commit\n  (merged to 'next' on 2013-02-05 at ccf1c97)\n + builtin/apply: tighten (dis)similarity index parsing\n\n Make sure the similarity value shown in the \"apply --summary\"\n output is sensible, even when the input had a bogus value.\n\n Will merge to 'master'.\n\n\n* nd/status-show-in-progress (2013-02-05) 1 commit\n - status: show the branch name if possible in in-progress info\n\n Will merge to 'next'.\n\n\n* sb/gpg-i18n (2013-01-31) 1 commit\n  (merged to 'next' on 2013-02-02 at 7a54574)\n + gpg: allow translation of more error messages\n\n Will merge to 'master'.\n\n\n* sb/run-command-fd-error-reporting (2013-02-01) 1 commit\n  (merged to 'next' on 2013-02-02 at be7e970)\n + run-command: be more informative about what failed\n\n Will merge to 'master'.\n\n\n* jk/remote-helpers-doc (2013-02-01) 1 commit\n  (merged to 'next' on 2013-02-02 at ce1461a)\n + Rename {git- => git}remote-helpers.txt\n\n \"git help remote-helpers\" did not work; 'remote-helpers' is not\n a subcommand name but a concept, so its documentation should have\n been in gitremote-helpers, not git-remote-helpers.\n\n Will merge to 'master'.\n\n\n* sp/smart-http-content-type-check (2013-02-06) 3 commits\n  (merged to 'next' on 2013-02-06 at 8bc6434)\n + http_request: reset \"type\" strbuf before adding\n  (merged to 'next' on 2013-02-05 at 157812c)\n + t5551: fix expected error output\n  (merged to 'next' on 2013-02-04 at d0759cb)\n + Verify Content-Type from smart HTTP servers\n\n The smart HTTP clients forgot to verify the content-type that comes\n back from the server side to make sure that the request is being\n handled properly.\n\n\n* jc/mention-tracking-for-pull-default (2013-01-31) 1 commit\n - doc: mention tracking for pull.default\n\n We stopped mentioning `tracking` is a deprecated but supported\n synonym for `upstream` in pull.default even though we have no\n intention of removing the support for it.\n\n This is my \"don't list it to catch readers' eyes, but make sure it\n can be found if the reader looks for it\" version; I'm not married\n to the layout and will be happy to take a replacement patch.\n\n Waiting for couter-proposal patches.\n\n\n* jk/doc-makefile-cleanup (2013-02-01) 1 commit\n  (merged to 'next' on 2013-02-02 at 86ff373)\n + Documentation/Makefile: clean up MAN*_TXT lists\n\n Will merge to 'master'.\n\n\n* ab/gitweb-use-same-scheme (2013-01-28) 1 commit\n  (merged to 'next' on 2013-02-02 at 7e4a108)\n + gitweb: refer to picon/gravatar images over the same scheme\n\n Avoid mixed contents on a page coming via http and https when\n gitweb is hosted on a https server.\n\n Will merge to 'master'.\n\n\n* jk/python-styles (2013-01-30) 1 commit\n  (merged to 'next' on 2013-02-02 at 293edc1)\n + CodingGuidelines: add Python coding guidelines\n\n Will merge to 'master'.\n\n\n* mp/complete-paths (2013-01-11) 1 commit\n  (merged to 'next' on 2013-01-30 at 70e4f1a)\n + git-completion.bash: add support for path completion\n (this branch is used by mk/tcsh-complete-only-known-paths.)\n\n The completion script used to let the default completer to suggest\n pathnames, which gave too many irrelevant choices (e.g. \"git add\"\n would not want to add an unmodified path).  Teach it to use a more\n git-aware logic to enumerate only relevant ones.\n\n This is logically the right thing to do, and we would really love\n to see people who have been involved in completion code to review\n and comment on the implementation.\n\n Will cook in 'next' to see if anybody screams.\n\n\n* ss/mergetools-tortoise (2013-02-01) 2 commits\n  (merged to 'next' on 2013-02-03 at d306b83)\n + mergetools: teach tortoisemerge to handle filenames with SP correctly\n + mergetools: support TortoiseGitMerge\n\n Update mergetools to work better with newer merge helper tortoise ships.\n\n Will merge to 'master'.\n\n\n* da/mergetool-docs (2013-02-02) 5 commits\n  (merged to 'next' on 2013-02-03 at f822dcf)\n + doc: generate a list of valid merge tools\n + mergetool--lib: list user configured tools in '--tool-help'\n + mergetool--lib: add functions for finding available tools\n + mergetool--lib: improve the help text in guess_merge_tool()\n + mergetool--lib: simplify command expressions\n (this branch uses jk/mergetool.)\n\n Build on top of the clean-up done by jk/mergetool and automatically\n generate the list of mergetool and difftool backends the build\n supports to be included in the documentation.\n\n Will merge to 'master'.\n\n\n* nd/branch-error-cases (2013-01-31) 6 commits\n  (merged to 'next' on 2013-02-02 at cf5e745)\n + branch: let branch filters imply --list\n + docs: clarify git-branch --list behavior\n + branch: mark more strings for translation\n + Merge branch 'nd/edit-branch-desc-while-detached' into HEAD\n + branch: give a more helpful message on redundant arguments\n + branch: reject -D/-d without branch name\n\n Fix various error messages and conditions in \"git branch\", e.g. we\n advertised \"branch -d/-D\" to remove one or more branches but actually\n implemented removal of zero or more branches---request to remove no\n branches was not rejected.\n\n Will merge to 'master'.\n\n\n* jk/mergetool (2013-01-28) 8 commits\n  (merged to 'next' on 2013-02-03 at 2ff5dee)\n + mergetools: simplify how we handle \"vim\" and \"defaults\"\n + mergetool--lib: don't call \"exit\" in setup_tool\n + mergetool--lib: improve show_tool_help() output\n + mergetools/vim: remove redundant diff command\n + git-difftool: use git-mergetool--lib for \"--tool-help\"\n + git-mergetool: don't hardcode 'mergetool' in show_tool_help\n + git-mergetool: remove redundant assignment\n + git-mergetool: move show_tool_help to mergetool--lib\n (this branch is used by da/mergetool-docs.)\n\n Cleans up mergetool/difftool combo.\n\n Will merge to 'master'.\n\n\n* jc/hidden-refs (2013-01-30) 7 commits\n - fetch: fetch objects by their exact SHA-1 object names\n - upload-pack: optionally allow fetching from the tips of hidden refs\n - fetch: use struct ref to represent refs to be fetched\n - parse_fetch_refspec(): clarify the codeflow a bit\n - upload/receive-pack: allow hiding ref hierarchies\n - upload-pack: simplify request validation\n - upload-pack: share more code\n\n Allow the server side to unclutter the refs/ namespace it shows to\n the client.  Optionally allow requests for histories leading to the\n tips of hidden refs by updated clients.\n\n Need to split the configuration into three (one for sending, one\n for receiving, and then another to cover both for convenience)\n before this topic can go forward. Perhaps people involved in the\n review cycle can help.\n\n\n* jc/remove-treesame-parent-in-simplify-merges (2013-01-17) 1 commit\n  (merged to 'next' on 2013-01-30 at b639b47)\n + simplify-merges: drop merge from irrelevant side branch\n\n The --simplify-merges logic did not cull irrelevant parents from a\n merge that is otherwise not interesting with respect to the paths\n we are following.\n\n This touches a fairly core part of the revision traversal\n infrastructure; even though I think this change is correct, please\n report immediately if you find any unintended side effect.\n\n Will cook in 'next'.\n\n\n* jc/push-2.0-default-to-simple (2013-01-16) 14 commits\n  (merged to 'next' on 2013-01-16 at 23f5df2)\n + t5570: do not assume the \"matching\" push is the default\n + t5551: do not assume the \"matching\" push is the default\n + t5550: do not assume the \"matching\" push is the default\n  (merged to 'next' on 2013-01-09 at 74c3498)\n + doc: push.default is no longer \"matching\"\n + push: switch default from \"matching\" to \"simple\"\n + t9401: do not assume the \"matching\" push is the default\n + t9400: do not assume the \"matching\" push is the default\n + t7406: do not assume the \"matching\" push is the default\n + t5531: do not assume the \"matching\" push is the default\n + t5519: do not assume the \"matching\" push is the default\n + t5517: do not assume the \"matching\" push is the default\n + t5516: do not assume the \"matching\" push is the default\n + t5505: do not assume the \"matching\" push is the default\n + t5404: do not assume the \"matching\" push is the default\n\n Will cook in 'next' until Git 2.0 ;-).\n\n\n* bc/append-signed-off-by (2013-01-27) 11 commits\n - Unify appending signoff in format-patch, commit and sequencer\n - format-patch: update append_signoff prototype\n - t4014: more tests about appending s-o-b lines\n - sequencer.c: teach append_signoff to avoid adding a duplicate newline\n - sequencer.c: teach append_signoff how to detect duplicate s-o-b\n - sequencer.c: always separate \"(cherry picked from\" from commit body\n - sequencer.c: recognize \"(cherry picked from ...\" as part of s-o-b footer\n - t/t3511: add some tests of 'cherry-pick -s' functionality\n - t/test-lib-functions.sh: allow to specify the tag name to test_commit\n - commit, cherry-pick -s: remove broken support for multiline rfc2822 fields\n - sequencer.c: rework search for start of footer to improve clarity\n\n Waiting for the final round of reroll before merging to 'next'.\n After that we will go incremental.\n"},{"id":"208846","messageId":"5112AE34.6080107@web.de","threadId":"32842","inReplyTo":"7v8v71cn3m.fsf@alter.siamese.dyndns.org","subject":"Re: What's cooking in git.git (Feb 2013, #03; Wed, 6)","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2013-02-06T19:25:40Z","receivedAt":"2013-02-06T19:25:40Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 06.02.2013 19:29, schrieb Junio C Hamano:\n> * jl/submodule-deinit (2013-02-04) 1 commit\n>  - submodule: add 'deinit' command\n> \n>  There was no Porcelain way to say \"I no longer am interested in\n>  this submodule\", once you express your interest in a submodule with\n>  \"submodule init\".  \"submodule deinit\" is the way to do so.\n> \n>  Will merge to 'next'.\n\nOops, I though you were waiting for a reroll. Currently I'm having the\nappended interdiff compared to your version. Changes are:\n\n- Add deinit to the --force documentation of \"git submodule\"\n- Never remove submodules containing a .git dir, even when forced\n- diagnostic output when \"rm -rf\" or \"mkdir\" fails\n- More test cases\n\nAnd I wanted to add three more test cases for modified submodules before\nsending v4. You could squash in the first two hunks into the commit you\nhave in pu and I'll send a follow up patch with the extra tests soon or\nyou could wait for me sending an updated patch. What do you think?\n\n---------------8<------------------\ndiff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt\nindex 7a149eb..45ee12b 100644\n--- a/Documentation/git-submodule.txt\n+++ b/Documentation/git-submodule.txt\n@@ -227,8 +227,10 @@ OPTIONS\n\n -f::\n --force::\n-\tThis option is only valid for add and update commands.\n+\tThis option is only valid for add, deinit and update commands.\n \tWhen running add, allow adding an otherwise ignored submodule path.\n+\tWhen running deinit the submodule work trees will be removed even if\n+\tthey contain local changes.\n \tWhen running update, throw away local changes in submodules when\n \tswitching to a different commit; and always run a checkout operation\n \tin the submodule, even if the commit listed in the index of the\ndiff --git a/git-submodule.sh b/git-submodule.sh\nindex f05b597..365c6de 100755\n--- a/git-submodule.sh\n+++ b/git-submodule.sh\n@@ -595,14 +595,25 @@ cmd_deinit()\n \t\t\tcontinue\n \t\tfi\n\n-\t\t# Remove the submodule work tree\n-\t\tif test -z \"$force\"\n+\t\t# Remove the submodule work tree (unless the user already did it)\n+\t\tif test -d \"$sm_path\"\n \t\tthen\n-\t\t\tgit rm -n \"$sm_path\" ||\n-\t\t\tdie \"$(eval_gettext \"Submodule work tree $sm_path contains local modifications, use '-f' to discard them\")\"\n+\t\t\t# Protect submodules containing a .git directory\n+\t\t\tif test -d \"$sm_path/.git\"\n+\t\t\tthen\n+\t\t\t\techo >&2 \"$(eval_gettext \"Submodule work tree $sm_path contains a .git directory\")\"\n+\t\t\t\tdie \"$(eval_gettext \"(use 'rm -rf' if you really want to remove it including all of its history)\")\"\n+\t\t\tfi\n+\n+\t\t\tif test -z \"$force\"\n+\t\t\tthen\n+\t\t\t\tgit rm -n \"$sm_path\" ||\n+\t\t\t\tdie \"$(eval_gettext \"Submodule work tree $sm_path contains local modifications, use '-f' to discard them\")\"\n+\t\t\tfi\n+\t\t\trm -rf \"$sm_path\" || say \"$(eval_gettext \"Could not remove submodule work tree '\\$sm_path'\")\"\n \t\tfi\n-\t\trm -rf \"$sm_path\"\n-\t\tmkdir \"$sm_path\"\n+\n+\t\tmkdir \"$sm_path\" || say \"$(eval_gettext \"Could not create empty submodule directory '\\$sm_path'\")\"\n\n \t\t# Remove the whole section so we have a clean state when the\n \t\t# user later decides to init this submodule again\ndiff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh\nindex 34d8274..0567f1a 100755\n--- a/t/t7400-submodule-basic.sh\n+++ b/t/t7400-submodule-basic.sh\n@@ -757,20 +757,46 @@ test_expect_success 'submodule add with an existing name fails unless forced' '\n \t)\n '\n\n+test_expect_success 'set up a second submodule' '\n+\tgit submodule add ./init2 example2 &&\n+\tgit commit -m \"submodle example2 added\"\n+'\n+\n test_expect_success 'submodule deinit should remove the whole submodule section from .git/config' '\n \tgit config submodule.example.foo bar &&\n+\tgit config submodule.example2.frotz nitfol &&\n \tgit submodule deinit init &&\n \ttest -z \"$(git config submodule.example.url)\" &&\n-\ttest -z \"$(git config submodule.example.foo)\"\n+\ttest -z \"$(git config submodule.example.foo)\" &&\n+\ttest -n \"$(git config submodule.example2.url)\" &&\n+\ttest -n \"$(git config submodule.example2.frotz)\" &&\n+\trmdir init\n '\n\n test_expect_success 'submodule deinit . deinits all initialized submodules' '\n \tgit submodule update --init &&\n \tgit config submodule.example.foo bar &&\n+\tgit config submodule.example2.frotz nitfol &&\n \ttest_must_fail git submodule deinit &&\n \tgit submodule deinit . &&\n \ttest -z \"$(git config submodule.example.url)\" &&\n-\ttest -z \"$(git config submodule.example.foo)\"\n+\ttest -z \"$(git config submodule.example.foo)\" &&\n+\ttest -z \"$(git config submodule.example2.url)\" &&\n+\ttest -z \"$(git config submodule.example2.frotz)\" &&\n+\trmdir init example2\n+'\n+\n+test_expect_success 'submodule deinit deinits a submodule when its work tree is missing or empty' '\n+\tgit submodule update --init &&\n+\trm -rf init example2/* example2/.git &&\n+\tgit config submodule.example.foo bar &&\n+\tgit config submodule.example2.frotz nitfol &&\n+\tgit submodule deinit init example2 &&\n+\ttest -z \"$(git config submodule.example.url)\" &&\n+\ttest -z \"$(git config submodule.example.foo)\" &&\n+\ttest -z \"$(git config submodule.example2.url)\" &&\n+\ttest -z \"$(git config submodule.example2.frotz)\" &&\n+\trmdir init\n '\n\n test_expect_success 'submodule deinit complains when explicitly used on an uninitialized submodule' '\n@@ -778,7 +804,24 @@ test_expect_success 'submodule deinit complains when explicitly used on an unini\n \tgit submodule deinit init >actual &&\n \ttest_i18ngrep \"Submodule .example. (.*) unregistered for path .init\" actual\n \tgit submodule deinit init >actual &&\n-\ttest_i18ngrep \"No url found for submodule path .init. in .git/config\" actual\n+\ttest_i18ngrep \"No url found for submodule path .init. in .git/config\" actual &&\n+\tgit submodule deinit . >actual &&\n+\ttest_i18ngrep \"Submodule .example2. (.*) unregistered for path .example2\" actual\n+\trmdir init example2\n+'\n+\n+test_expect_success 'submodule deinit fails when submodule has a .git directory even when forced' '\n+\tgit submodule update --init &&\n+\t(\n+\t\tcd init &&\n+\t\trm .git &&\n+\t\tcp -R ../.git/modules/example .git &&\n+\t\tGIT_WORK_TREE=. git config --unset core.worktree\n+\t) &&\n+\ttest_must_fail git submodule deinit init &&\n+\ttest_must_fail git submodule deinit -f init &&\n+\ttest -d init/.git &&\n+\ttest -n \"$(git config submodule.example.url)\"\n '\n\n test_done\n"},{"id":"208848","messageId":"7vsj59b5am.fsf@alter.siamese.dyndns.org","threadId":"32842","inReplyTo":"5112AE34.6080107@web.de","subject":"Re: What's cooking in git.git (Feb 2013, #03; Wed, 6)","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-02-06T19:39:29Z","receivedAt":"2013-02-06T19:39:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jens Lehmann <Jens.Lehmann@web.de> writes:\n\n> Am 06.02.2013 19:29, schrieb Junio C Hamano:\n>> * jl/submodule-deinit (2013-02-04) 1 commit\n>>  - submodule: add 'deinit' command\n>> \n>>  There was no Porcelain way to say \"I no longer am interested in\n>>  this submodule\", once you express your interest in a submodule with\n>>  \"submodule init\".  \"submodule deinit\" is the way to do so.\n>> \n>>  Will merge to 'next'.\n>\n> Oops, I though you were waiting for a reroll. Currently I'm having the\n> appended interdiff compared to your version. Changes are:\n>\n> - Add deinit to the --force documentation of \"git submodule\"\n> - Never remove submodules containing a .git dir, even when forced\n> - diagnostic output when \"rm -rf\" or \"mkdir\" fails\n> - More test cases\n>\n> And I wanted to add three more test cases for modified submodules before\n> sending v4. You could squash in the first two hunks into the commit you\n> have in pu and I'll send a follow up patch with the extra tests soon or\n> you could wait for me sending an updated patch. What do you think?\n\nI haven't merged it down to 'next' yet.  So please proceed as you\nplanned.  Thanks for stopping me.\n"}]}