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

[PATCH] reflog: fix typo in "reflog expire" clean-up codepath

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2013, 21:39 UTC
Message-ID
<7vtxopsf0l.fsf@alter.siamese.dyndns.org>

In "reflog expire" we were not clearing the REACHABLE bit from objects reachable from the tip of refs we marked earlier.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/reflog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index b3c9e27..ef56e7b 100644
--- a/builtin/reflog.c
+++ b/builtin/reflog.c
@@ -414,7 +414,7 @@ static int expire_reflog(const char *ref, const unsigned char *sha1, int unused,
 		if (cb.unreachable_expire_kind == UE_HEAD) {
 			struct commit_list *elem;
 			for (elem = tips; elem; elem = elem->next)
-				clear_commit_marks(tip_commit, REACHABLE);
+				clear_commit_marks(elem->item, REACHABLE);
 			free_commit_list(tips);
 		} else {
 			clear_commit_marks(tip_commit, REACHABLE);
-- 
1.8.2-rc2-187-g1ea4a7c
Message 1 of 1 in “reflog: fix typo in "reflog expire" clean-up codepath”
  1. reflog: fix typo in "reflog expire" clean-up codepathJunio C Hamano, Mar 5, 2013

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.