Nguyen Thai Ngoc Duy wrote: > there's another case, when RUN_SETUP_GENTLY is > set, but no repository is found. git_config() will pick > $(cwd)/.git/config if it exists. I guess it's OK for this series > because the true fix will require more changes. I have claimed before that it’s better to fix a few bugs now and provide a solid foundation to build on than to try to do everything right away. Sounds good in principle, but in practice we have to look to the future to decide whether the foundation is strong enough. So here are some ideas for future work (not necessarily in order). - Teach remaining commands that need to search for a repository to use RUN_SETUP_GENTLY, with appropriate exceptions where needed (for --no-index, for example). - Introduce unset_git_directory and the RUN_UNSETUP option (yes, this needs a better name). Teach commands that work without a git directory to use it (this should fix the init poisoned by parent repository and aliased init problems). - Teach git_config() to ignore the repository-specific configuration if have_run_setup is true but have_repository is false. - Teach git_attr() to ignore .git/info/attributes if have_run_setup is true but have_repository is false. - Teach git_config() to optionally die if have_run_setup is not true and the setup_git_dir* to optionally die if have_run_setup is true. test-lib.sh would enable this option. Sane? Jonathan -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html