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

[PATCH 2/2] path.c: mark 'logs/HEAD' in 'common_list' as file

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Oct 18, 2019, 11:42 UTC
Message-ID
<20191018114202.5452-3-szeder.dev@gmail.com>
In-Reply-To
<20191018114202.5452-1-szeder.dev@gmail.com>

'logs/HEAD', i.e. HEAD's reflog, is a file, but its entry in 'common_list' has the 'is_dir' bit set.

Unset that bit to make it consistent with what 'logs/HEAD' is supposed to be.

This doesn't make a difference in behavior: check_common() is the only function that looks at the 'is_dir' bit, and that function either returns 0, or '!exclude', which for 'logs/HEAD' results in 0 as well.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/path.c b/path.c
index eeb43e1d25..04b69b9feb 100644
--- a/path.c
+++ b/path.c
@@ -113,7 +113,7 @@ static struct common_dir common_list[] = {
 	{ 0, 1, 0, "info" },
 	{ 0, 0, 1, "info/sparse-checkout" },
 	{ 1, 1, 0, "logs" },
-	{ 1, 1, 1, "logs/HEAD" },
+	{ 1, 0, 1, "logs/HEAD" },
 	{ 0, 1, 1, "logs/refs/bisect" },
 	{ 0, 1, 1, "logs/refs/rewritten" },
 	{ 0, 1, 1, "logs/refs/worktree" },
-- 
2.23.0.1084.gae250eaa40
Previous: SZEDER GáborNext: Johannes Schindelin
Message 11 of 31 in “Handle git_path() with lock files correctly in worktrees”
  1. 0/2 Handle git_path() with lock files correctly in worktreesJohannes Schindelin via GitGitGadget, Oct 16, 2019
  2. 1/2 t1400: wrap setup code in test caseJohannes Schindelin via GitGitGadget, Oct 16, 2019
  3. 2/2 git_path(): handle `.lock` files correctlyJohannes Schindelin via GitGitGadget, Oct 16, 2019
  4. SZEDER GáborOct 16, 2019
  5. Junio C HamanoOct 17, 2019
  6. Johannes SchindelinOct 17, 2019
  7. SZEDER GáborOct 18, 2019
  8. SZEDER GáborOct 18, 2019
  9. 0/2 path.c: minor common_list fixesSZEDER Gábor, Oct 18, 2019
  10. 1/2 path.c: fix field name in 'struct common_dir'SZEDER Gábor, Oct 18, 2019
  11. 2/2 path.c: mark 'logs/HEAD' in 'common_list' as fileSZEDER Gábor, Oct 18, 2019
  12. Johannes SchindelinOct 21, 2019
  13. 0/2 Handle git_path() with lock files correctly in worktreesJohannes Schindelin via GitGitGadget, Oct 17, 2019
  14. 1/2 t1400: wrap setup code in test caseJohannes Schindelin via GitGitGadget, Oct 17, 2019
  15. 2/2 git_path(): handle `.lock` files correctlyJohannes Schindelin via GitGitGadget, Oct 17, 2019
  16. Junio C HamanoOct 18, 2019
  17. SZEDER GáborOct 18, 2019
  18. Johannes SchindelinOct 21, 2019
  19. Junio C HamanoOct 23, 2019
  20. 0/2 Handle git_path() with lock files correctly in worktreesJohannes Schindelin via GitGitGadget, Oct 21, 2019
  21. 1/2 t1400: wrap setup code in test caseJohannes Schindelin via GitGitGadget, Oct 21, 2019
  22. 2/2 git_path(): handle `.lock` files correctlyJohannes Schindelin via GitGitGadget, Oct 21, 2019
  23. SZEDER GáborOct 22, 2019
  24. Junio C HamanoOct 23, 2019
  25. Johannes SchindelinOct 28, 2019
  26. SZEDER GáborOct 28, 2019
  27. Junio C HamanoOct 28, 2019
  28. 0/2 Handle git_path() with lock files correctly in worktreesJohannes Schindelin via GitGitGadget, Oct 28, 2019
  29. 1/2 t1400: wrap setup code in test caseJohannes Schindelin via GitGitGadget, Oct 28, 2019
  30. 2/2 git_path(): handle `.lock` files correctlyJohannes Schindelin via GitGitGadget, Oct 28, 2019
  31. Junio C HamanoOct 29, 2019

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.