git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 39/47] setup: limit get_git_work_tree()'s to explicit setup case only

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Nov 26, 2010, 15:32 UTC
Message-ID
<1290785563-15339-40-git-send-email-pclouds@gmail.com>
In-Reply-To
<1290785563-15339-1-git-send-email-pclouds@gmail.com>

get_git_work_tree() takes input as core.worktree, core.bare, GIT_WORK_TREE and decides correct worktree setting.

Unfortunately it does not do its job well. core.worktree and GIT_WORK_TREE should only be taken into account, if GIT_DIR is set (which is handled by setup_explicit_git_dir). For other setup cases, only core.bare matters.

Add a temporary variable setup_explicit to adjust get_git_work_tree() behavior as such. This variable will be gone once setup_* rework is done.

Also remove is_bare_repository_cfg check in set_git_work_tree() to ease the rework. We are going to check for core.bare and core.worktree early before setting worktree. For example, if core.bare is true, no need to set worktree.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/init-db.c     |    1 +
 cache.h               |    1 +
 environment.c         |   10 ++++++-
 setup.c               |   10 ++++++-
 t/t1510-repo-setup.sh |   66 ++++++++++++++++++++++++------------------------
 5 files changed, 51 insertions(+), 37 deletions(-)
diff --git a/builtin/init-db.c b/builtin/init-db.c
index 9d4886c..ea06478 100644
--- a/builtin/init-db.c
+++ b/builtin/init-db.c
@@ -496,6 +496,7 @@ int cmd_init_db(int argc, const char **argv, const char *prefix)
 	if (is_bare_repository_cfg < 0)
 		is_bare_repository_cfg = guess_repository_type(git_dir);
 
+	startup_info->setup_explicit = 1;
 	if (!is_bare_repository_cfg) {
 		if (git_dir) {
 			const char *git_dir_parent = strrchr(git_dir, '/');
diff --git a/cache.h b/cache.h
index 123dd4b..b2cdda7 100644
--- a/cache.h
+++ b/cache.h
@@ -1119,6 +1119,7 @@ const char *split_cmdline_strerror(int cmdline_errno);
 /* git.c */
 struct startup_info {
 	int have_repository;
+	int setup_explicit;
 };
 extern struct startup_info *startup_info;
 
diff --git a/environment.c b/environment.c
index de5581f..d811049 100644
--- a/environment.c
+++ b/environment.c
@@ -137,8 +137,6 @@ static int git_work_tree_initialized;
  */
 void set_git_work_tree(const char *new_work_tree)
 {
-	if (is_bare_repository_cfg >= 0)
-		die("cannot set work tree after initialization");
 	git_work_tree_initialized = 1;
 	free(work_tree);
 	work_tree = xstrdup(make_absolute_path(new_work_tree));
@@ -147,6 +145,14 @@ void set_git_work_tree(const char *new_work_tree)
 
 const char *get_git_work_tree(void)
 {
+	if (startup_info && !startup_info->setup_explicit) {
+		if (is_bare_repository_cfg == 1)
+			return NULL;
+		if (work_tree)
+			is_bare_repository_cfg = 0;
+		return work_tree;
+	}
+
 	if (!git_work_tree_initialized) {
 		work_tree = getenv(GIT_WORK_TREE_ENVIRONMENT);
 		/* core.bare = true overrides implicit and config work tree */
diff --git a/setup.c b/setup.c
index 49a1a25..c7d7198 100644
--- a/setup.c
+++ b/setup.c
@@ -331,6 +331,8 @@ static const char *setup_explicit_git_dir(const char *gitdirenv,
 	static char buffer[1024 + 1];
 	const char *retval;
 
+	if (startup_info)
+		startup_info->setup_explicit = 1;
 	if (PATH_MAX - 40 < strlen(gitdirenv))
 		die("'$%s' too big", GIT_DIR_ENVIRONMENT);
 	if (!is_git_directory(gitdirenv)) {
@@ -382,12 +384,15 @@ static const char *setup_discovered_git_dir(const char *work_tree_env,
 					    char *cwd, int *nongit_ok)
 {
 	int root_len;
+	char *work_tree;
 
 	inside_git_dir = 0;
 	if (!work_tree_env)
 		inside_work_tree = 1;
 	root_len = offset_1st_component(cwd);
-	git_work_tree_cfg = xstrndup(cwd, offset > root_len ? offset : root_len);
+	work_tree = xstrndup(cwd, offset > root_len ? offset : root_len);
+	set_git_work_tree(work_tree);
+	free(work_tree);
 	if (check_repository_format_gently(gitdir, nongit_ok))
 		return NULL;
 	if (offset == len)
@@ -627,7 +632,8 @@ const char *setup_git_directory(void)
 	const char *retval = setup_git_directory_gently(NULL);
 
 	/* If the work tree is not the default one, recompute prefix */
-	if (inside_work_tree < 0) {
+	if ((!startup_info || startup_info->setup_explicit) &&
+	    inside_work_tree < 0) {
 		static char buffer[PATH_MAX + 1];
 		char *rel;
 		if (retval && chdir(retval))
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index d8c181d..45feb80 100755
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
@@ -132,7 +132,7 @@ test_expect_success '#1: setup' '
 	cd ..
 '
 
-test_expect_failure '#1: at root' '
+test_expect_success '#1: at root' '
 	cat >1/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: $TRASH_DIRECTORY/1
@@ -142,7 +142,7 @@ EOF
 	test_repo 1
 '
 
-test_expect_failure '#1: in subdir' '
+test_expect_success '#1: in subdir' '
 	cat >1/sub/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: $TRASH_DIRECTORY/1
@@ -512,7 +512,7 @@ test_expect_success '#4: setup' '
 	cd ..
 '
 
-test_expect_failure '#4: at root' '
+test_expect_success '#4: at root' '
 	cat >4/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: $TRASH_DIRECTORY/4
@@ -522,7 +522,7 @@ EOF
 	test_repo 4
 '
 
-test_expect_failure '#4: in subdir' '
+test_expect_success '#4: in subdir' '
 	cat >4/sub/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: $TRASH_DIRECTORY/4
@@ -560,7 +560,7 @@ test_expect_success '#5: setup' '
 	cd ..
 '
 
-test_expect_failure '#5: at root' '
+test_expect_success '#5: at root' '
 	cat >5/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: $TRASH_DIRECTORY/5
@@ -570,7 +570,7 @@ EOF
 	test_repo 5
 '
 
-test_expect_failure '#5: in subdir' '
+test_expect_success '#5: in subdir' '
 	cat >5/sub/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: $TRASH_DIRECTORY/5
@@ -1213,7 +1213,7 @@ test_expect_success '#9: setup' '
 	cd ..
 '
 
-test_expect_failure '#9: at root' '
+test_expect_success '#9: at root' '
 	cat >9/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/9.git
 setup: worktree: $TRASH_DIRECTORY/9
@@ -1223,7 +1223,7 @@ EOF
 	test_repo 9
 '
 
-test_expect_failure '#9: in subdir' '
+test_expect_success '#9: in subdir' '
 	cat >9/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/9.git
 setup: worktree: $TRASH_DIRECTORY/9
@@ -1596,7 +1596,7 @@ test_expect_success '#12: setup' '
 	cd ..
 '
 
-test_expect_failure '#12: at root' '
+test_expect_success '#12: at root' '
 	cat >12/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/12.git
 setup: worktree: $TRASH_DIRECTORY/12
@@ -1606,7 +1606,7 @@ EOF
 	test_repo 12
 '
 
-test_expect_failure '#12: in subdir' '
+test_expect_success '#12: in subdir' '
 	cat >12/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/12.git
 setup: worktree: $TRASH_DIRECTORY/12
@@ -1646,7 +1646,7 @@ test_expect_success '#13: setup' '
 	cd ..
 '
 
-test_expect_failure '#13: at root' '
+test_expect_success '#13: at root' '
 	cat >13/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/13.git
 setup: worktree: $TRASH_DIRECTORY/13
@@ -1656,7 +1656,7 @@ EOF
 	test_repo 13
 '
 
-test_expect_failure '#13: in subdir' '
+test_expect_success '#13: in subdir' '
 	cat >13/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/13.git
 setup: worktree: $TRASH_DIRECTORY/13
@@ -2388,7 +2388,7 @@ test_expect_success '#17.1: setup' '
 	cd ..
 '
 
-test_expect_failure '#17.1: at .git' '
+test_expect_success '#17.1: at .git' '
 	cat >17/.git/expected <<EOF &&
 setup: git_dir: .
 setup: worktree: (null)
@@ -2398,7 +2398,7 @@ EOF
 	test_repo 17/.git
 '
 
-test_expect_failure '#17.1: in .git/wt' '
+test_expect_success '#17.1: in .git/wt' '
 	cat >17/.git/wt/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/17/.git
 setup: worktree: (null)
@@ -2408,7 +2408,7 @@ EOF
 	test_repo 17/.git/wt
 '
 
-test_expect_failure '#17.1: in .git/wt/sub' '
+test_expect_success '#17.1: in .git/wt/sub' '
 	cat >17/.git/wt/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/17/.git
 setup: worktree: (null)
@@ -2439,7 +2439,7 @@ test_expect_success '#17.2: setup' '
 	git config --file="$TRASH_DIRECTORY/17/.git/config" core.bare true
 '
 
-test_expect_failure '#17.2: at .git' '
+test_expect_success '#17.2: at .git' '
 	cat >17/.git/expected <<EOF &&
 setup: git_dir: .
 setup: worktree: (null)
@@ -2449,7 +2449,7 @@ EOF
 	test_repo 17/.git
 '
 
-test_expect_failure '#17.2: in .git/wt' '
+test_expect_success '#17.2: in .git/wt' '
 	cat >17/.git/wt/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/17/.git
 setup: worktree: (null)
@@ -2459,7 +2459,7 @@ EOF
 	test_repo 17/.git/wt
 '
 
-test_expect_failure '#17.2: in .git/wt/sub' '
+test_expect_success '#17.2: in .git/wt/sub' '
 	cat >17/.git/wt/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/17/.git
 setup: worktree: (null)
@@ -2469,7 +2469,7 @@ EOF
 	test_repo 17/.git/wt/sub
 '
 
-test_expect_failure '#17.2: at root' '
+test_expect_success '#17.2: at root' '
 	cat >17/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: (null)
@@ -2853,7 +2853,7 @@ test_expect_success '#20.1: setup' '
 	cd ..
 '
 
-test_expect_failure '#20.1: at .git' '
+test_expect_success '#20.1: at .git' '
 	cat >20/.git/expected <<EOF &&
 setup: git_dir: .
 setup: worktree: (null)
@@ -2863,7 +2863,7 @@ EOF
 	test_repo 20/.git
 '
 
-test_expect_failure '#20.1: in .git/wt' '
+test_expect_success '#20.1: in .git/wt' '
 	cat >20/.git/wt/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/20/.git
 setup: worktree: (null)
@@ -2873,7 +2873,7 @@ EOF
 	test_repo 20/.git/wt
 '
 
-test_expect_failure '#20.1: in .git/wt/sub' '
+test_expect_success '#20.1: in .git/wt/sub' '
 	cat >20/.git/wt/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/20/.git
 setup: worktree: (null)
@@ -2983,7 +2983,7 @@ test_expect_success '#21.1: setup' '
 	cd ..
 '
 
-test_expect_failure '#21.1: at .git' '
+test_expect_success '#21.1: at .git' '
 	cat >21/.git/expected <<EOF &&
 setup: git_dir: .
 setup: worktree: (null)
@@ -2993,7 +2993,7 @@ EOF
 	test_repo 21/.git
 '
 
-test_expect_failure '#21.1: in .git/wt' '
+test_expect_success '#21.1: in .git/wt' '
 	cat >21/.git/wt/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/21/.git
 setup: worktree: (null)
@@ -3003,7 +3003,7 @@ EOF
 	test_repo 21/.git/wt
 '
 
-test_expect_failure '#21.1: in .git/wt/sub' '
+test_expect_success '#21.1: in .git/wt/sub' '
 	cat >21/.git/wt/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/21/.git
 setup: worktree: (null)
@@ -3034,7 +3034,7 @@ test_expect_success '#21.2: setup' '
 	git config --file="$TRASH_DIRECTORY/21/.git/config" core.bare true
 '
 
-test_expect_failure '#21.2: at .git' '
+test_expect_success '#21.2: at .git' '
 	cat >21/.git/expected <<EOF &&
 setup: git_dir: .
 setup: worktree: (null)
@@ -3044,7 +3044,7 @@ EOF
 	test_repo 21/.git
 '
 
-test_expect_failure '#21.2: in .git/wt' '
+test_expect_success '#21.2: in .git/wt' '
 	cat >21/.git/wt/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/21/.git
 setup: worktree: (null)
@@ -3054,7 +3054,7 @@ EOF
 	test_repo 21/.git/wt
 '
 
-test_expect_failure '#21.2: in .git/wt/sub' '
+test_expect_success '#21.2: in .git/wt/sub' '
 	cat >21/.git/wt/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/21/.git
 setup: worktree: (null)
@@ -3064,7 +3064,7 @@ EOF
 	test_repo 21/.git/wt/sub
 '
 
-test_expect_failure '#21.2: at root' '
+test_expect_success '#21.2: at root' '
 	cat >21/expected <<EOF &&
 setup: git_dir: .git
 setup: worktree: (null)
@@ -3716,7 +3716,7 @@ test_expect_success '#24: setup' '
 	cd ..
 '
 
-test_expect_success '#24: at root' '
+test_expect_failure '#24: at root' '
 	cat >24/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/24.git
 setup: worktree: (null)
@@ -3726,7 +3726,7 @@ EOF
 	test_repo 24
 '
 
-test_expect_success '#24: in subdir' '
+test_expect_failure '#24: in subdir' '
 	cat >24/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/24.git
 setup: worktree: (null)
@@ -4151,7 +4151,7 @@ test_expect_success '#28: setup' '
 	cd ..
 '
 
-test_expect_success '#28: at root' '
+test_expect_failure '#28: at root' '
 	cat >28/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/28.git
 setup: worktree: (null)
@@ -4161,7 +4161,7 @@ EOF
 	test_repo 28
 '
 
-test_expect_success '#28: in subdir' '
+test_expect_failure '#28: in subdir' '
 	cat >28/sub/expected <<EOF &&
 setup: git_dir: $TRASH_DIRECTORY/28.git
 setup: worktree: (null)
-- 
1.7.3.2.316.gda8b3
Previous: Nguyễn Thái Ngọc DuyNext: Jonathan Nieder
Message 51 of 87 in “nd/setup updates on pu”
  1. 00/47 nd/setup updates on puNguyễn Thái Ngọc Duy, Nov 26, 2010
  2. 01/47 builtins: print setup info if repo is foundNguyễn Thái Ngọc Duy, Nov 26, 2010
  3. 0/3 trace: omit noisy repository discovery reportJonathan Nieder, Jan 26, 2011
  4. 1/3 setup: do not expose tracing codeJonathan Nieder, Jan 26, 2011
  5. 2/3 trace: omit repository discovery reportJonathan Nieder, Jan 26, 2011
  6. Sverre RabbelierJan 26, 2011
  7. Jonathan NiederJan 26, 2011
  8. Nguyen Thai Ngoc DuyJan 26, 2011
  9. 3/3 tests: avoid unnecessary use of GIT_TRACE in repo-setup testsJonathan Nieder, Jan 26, 2011
  10. Nguyen Thai Ngoc DuyJan 26, 2011
  11. Jeff KingJan 26, 2011
  12. 02/47 Add t1510 and basic rules that run repo setupNguyễn Thái Ngọc Duy, Nov 26, 2010
  13. 03/47 t1510: setup case #0Nguyễn Thái Ngọc Duy, Nov 26, 2010
  14. 04/47 t1510: setup case #1Nguyễn Thái Ngọc Duy, Nov 26, 2010
  15. 05/47 t1510: setup case #2Nguyễn Thái Ngọc Duy, Nov 26, 2010
  16. 06/47 t1510: setup case #3Nguyễn Thái Ngọc Duy, Nov 26, 2010
  17. 07/47 t1510: setup case #4Nguyễn Thái Ngọc Duy, Nov 26, 2010
  18. 08/47 t1510: setup case #5Nguyễn Thái Ngọc Duy, Nov 26, 2010
  19. 09/47 t1510: setup case #6Nguyễn Thái Ngọc Duy, Nov 26, 2010
  20. 10/47 t1510: setup case #7Nguyễn Thái Ngọc Duy, Nov 26, 2010
  21. 11/47 t1510: setup case #8Nguyễn Thái Ngọc Duy, Nov 26, 2010
  22. 12/47 t1510: setup case #9Nguyễn Thái Ngọc Duy, Nov 26, 2010
  23. 13/47 t1510: setup case #10Nguyễn Thái Ngọc Duy, Nov 26, 2010
  24. 14/47 t1510: setup case #11Nguyễn Thái Ngọc Duy, Nov 26, 2010
  25. 15/47 t1510: setup case #12Nguyễn Thái Ngọc Duy, Nov 26, 2010
  26. 16/47 t1510: setup case #13Nguyễn Thái Ngọc Duy, Nov 26, 2010
  27. 17/47 t1510: setup case #14Nguyễn Thái Ngọc Duy, Nov 26, 2010
  28. 18/47 t1510: setup case #15Nguyễn Thái Ngọc Duy, Nov 26, 2010
  29. 19/47 t1510: setup case #16Nguyễn Thái Ngọc Duy, Nov 26, 2010
  30. 20/47 t1510: setup case #17Nguyễn Thái Ngọc Duy, Nov 26, 2010
  31. 21/47 t1510: setup case #18Nguyễn Thái Ngọc Duy, Nov 26, 2010
  32. 22/47 t1510: setup case #19Nguyễn Thái Ngọc Duy, Nov 26, 2010
  33. 23/47 t1510: setup case #20Nguyễn Thái Ngọc Duy, Nov 26, 2010
  34. 24/47 t1510: setup case #21Nguyễn Thái Ngọc Duy, Nov 26, 2010
  35. 25/47 t1510: setup case #22Nguyễn Thái Ngọc Duy, Nov 26, 2010
  36. 26/47 t1510: setup case #23Nguyễn Thái Ngọc Duy, Nov 26, 2010
  37. 27/47 t1510: setup case #24Nguyễn Thái Ngọc Duy, Nov 26, 2010
  38. 28/47 t1510: setup case #25Nguyễn Thái Ngọc Duy, Nov 26, 2010
  39. 29/47 t1510: setup case #26Nguyễn Thái Ngọc Duy, Nov 26, 2010
  40. 30/47 t1510: setup case #27Nguyễn Thái Ngọc Duy, Nov 26, 2010
  41. 31/47 t1510: setup case #28Nguyễn Thái Ngọc Duy, Nov 26, 2010
  42. 32/47 t1510: setup case #29Nguyễn Thái Ngọc Duy, Nov 26, 2010
  43. 33/47 t1510: setup case #30Nguyễn Thái Ngọc Duy, Nov 26, 2010
  44. 34/47 t1510: setup case #31Nguyễn Thái Ngọc Duy, Nov 26, 2010
  45. 35/47 git-rev-parse.txt: clarify --git-dirNguyễn Thái Ngọc Duy, Nov 26, 2010
  46. 36/47 rev-parse: prints --git-dir relative to user's cwdNguyễn Thái Ngọc Duy, Nov 26, 2010
  47. Junio C HamanoDec 22, 2010
  48. Nguyen Thai Ngoc DuyDec 22, 2010
  49. 37/47 Add git_config_early()Nguyễn Thái Ngọc Duy, Nov 26, 2010
  50. 38/47 Use git_config_early() instead of git_config() during repo setupNguyễn Thái Ngọc Duy, Nov 26, 2010
  51. 39/47 setup: limit get_git_work_tree()'s to explicit setup case onlyNguyễn Thái Ngọc Duy, Nov 26, 2010
  52. Jonathan NiederJan 18, 2011
  53. Nguyen Thai Ngoc DuyJan 18, 2011
  54. Junio C HamanoJan 18, 2011
  55. Nguyen Thai Ngoc DuyJan 19, 2011
  56. 0/3 setup: stop ignoring GIT_WORK_TREE (when GIT_DIR is unset)Jonathan Nieder, Jan 19, 2011
  57. 1/3 tests: cosmetic improvements to the repo-setup testJonathan Nieder, Jan 19, 2011
  58. 3/3 setup: always honor GIT_WORK_TREE and core.worktreeJonathan Nieder, Jan 19, 2011
  59. Nguyen Thai Ngoc DuyJan 19, 2011
  60. Jonathan NiederJan 19, 2011
  61. Junio C HamanoJan 19, 2011
  62. Junio C HamanoJan 21, 2011
  63. Junio C HamanoJan 21, 2011
  64. Jonathan NiederJan 21, 2011
  65. Junio C HamanoJan 21, 2011
  66. Nguyen Thai Ngoc DuyJan 22, 2011
  67. Junio C HamanoJan 23, 2011
  68. Jonathan NiederJan 24, 2011
  69. MaaartinJan 19, 2011
  70. Junio C HamanoJan 19, 2011
  71. MaaartinJan 19, 2011
  72. checkout to other directory (Re: [PATCH 3/3] setup: always honor GIT_WORK_TREE and core.worktree)Jonathan Nieder, Jan 19, 2011
  73. Jonathan NiederJan 19, 2011
  74. Junio C HamanoJan 19, 2011
  75. Jonathan NiederJan 19, 2011
  76. 40/47 setup: clean up setup_bare_git_dir()Nguyễn Thái Ngọc Duy, Nov 26, 2010
  77. 41/47 t1020-subdirectory: test alias expansion in a subdirectoryNguyễn Thái Ngọc Duy, Nov 26, 2010
  78. 42/47 setup: clean up setup_discovered_git_dir()Nguyễn Thái Ngọc Duy, Nov 26, 2010
  79. 43/47 setup: rework setup_explicit_git_dir()Nguyễn Thái Ngọc Duy, Nov 26, 2010
  80. 44/47 Remove all logic from get_git_work_tree()Nguyễn Thái Ngọc Duy, Nov 26, 2010
  81. Junio C HamanoDec 22, 2010
  82. Nguyen Thai Ngoc DuyDec 22, 2010
  83. Junio C HamanoDec 22, 2010
  84. 45/47 t0001: test git init when run via an aliasNguyễn Thái Ngọc Duy, Nov 26, 2010
  85. 46/47 Revert "Documentation: always respect core.worktree if set"Nguyễn Thái Ngọc Duy, Nov 26, 2010
  86. 47/47 git.txt: correct where --work-tree path is relative toNguyễn Thái Ngọc Duy, Nov 26, 2010
  87. Junio C HamanoNov 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.