Git fork

Merge branch 'kl/setup-in-unreadable-worktree'

Disable the "do not remove the directory the user started Git in"
logic when Git cannot tell where that directory is. Earlier we
refused to run in such a case.

* kl/setup-in-unreadable-worktree:
setup: don't die if realpath(3) fails on getcwd(3)

+10 -1
+10 -1
setup.c
··· 459 459 */ 460 460 461 461 /* Normalize the directory */ 462 - strbuf_realpath(&tmp, tmp_original_cwd, 1); 462 + if (!strbuf_realpath(&tmp, tmp_original_cwd, 0)) { 463 + trace2_data_string("setup", the_repository, 464 + "realpath-path", tmp_original_cwd); 465 + trace2_data_string("setup", the_repository, 466 + "realpath-failure", strerror(errno)); 467 + free((char*)tmp_original_cwd); 468 + tmp_original_cwd = NULL; 469 + return; 470 + } 471 + 463 472 free((char*)tmp_original_cwd); 464 473 tmp_original_cwd = NULL; 465 474 startup_info->original_cwd = strbuf_detach(&tmp, NULL);