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

Re: [PATCH 1/2] fsck_handle_reflog_sha1(): new function

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jun 8, 2015, 15:17 UTC
Message-ID
<5575B1F7.8030400@alum.mit.edu>
In-Reply-To
<xmqqwpzeck72.fsf@gitster.dls.corp.google.com>
On 06/08/2015 05:07 PM, Junio C Hamano wrote:
Show 10 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
> 
>> New function, extracted from fsck_handle_reflog_ent(). The extra
>> is_null_sha1() test for the new reference is currently unnecessary, as
>> reflogs are deleted when the reference itself is deleted. But it
>> doesn't hurt, either.
> 
> I think we would crash with today's code in such a situation, but
> wouldn't we want to diagnose a 0{40} object name on the "new" side
> of the reflog entry as an error in the endgame state?

Good point. new_sha1 == NULL_SHA1 should be diagnosed and reported with a distinct error message.

> [...]
Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
Previous: Junio C HamanoNext: Michael Haggerty
Message 5 of 11 in “fsck: don't ignore broken reflog entries”
  1. 0/2 fsck: don't ignore broken reflog entriesMichael Haggerty, Jun 8, 2015
  2. 1/2 fsck_handle_reflog_sha1(): new functionMichael Haggerty, Jun 8, 2015
  3. Johannes SchindelinJun 8, 2015
  4. Junio C HamanoJun 8, 2015
  5. Michael HaggertyJun 8, 2015
  6. 2/2 fsck: report errors if reflog entries point at invalid objectsMichael Haggerty, Jun 8, 2015
  7. Johannes SchindelinJun 8, 2015
  8. Michael HaggertyJun 8, 2015
  9. Johannes SchindelinJun 8, 2015
  10. Jeff KingJun 8, 2015
  11. Johannes SchindelinJun 8, 2015

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.