Further clean-up of the initialization code.
* jk/repo-init-cleanup:
config: stop checking whether the_repository is NULL
common-main: delay trace2 initialization
t1309: use short branch name in includeIf.onbranch test
git_resolve_executable_dir(argv[0]);
- trace2_initialize();
- trace2_cmd_start(argv);
- trace2_collect_process_info(TRACE2_PROCESS_INFO_STARTUP);
-
git_setup_gettext();
initialize_the_repository();
attr_start();
+ trace2_initialize();
+ trace2_cmd_start(argv);
+ trace2_collect_process_info(TRACE2_PROCESS_INFO_STARTUP);
+
result = cmd_main(argc, argv);
trace2_cmd_exit(result);
int flags;
int ret;
struct strbuf pattern = STRBUF_INIT;
- const char *refname = !the_repository || !the_repository->gitdir ?
+ const char *refname = !the_repository->gitdir ?
NULL : resolve_ref_unsafe("HEAD", 0, NULL, &flags);
const char *shortname;
test_expect_success 'early config and onbranch' '
echo "[broken" >broken &&
- test_with_config "[includeif \"onbranch:refs/heads/master\"]path=../broken"
+ test_with_config "[includeif \"onbranch:master\"]path=../broken"
+'
+
+test_expect_success 'onbranch config outside of git repo' '
+ test_config_global includeIf.onbranch:master.path non-existent &&
+ nongit git help
'
test_done