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

Re: [PATCH 6/8] cogito: Don't ever assume object type in cg-object-id

From
Petr Baudis <pasky@suse.cz>
Date
Sep 21, 2005, 10:00 UTC
Message-ID
<20050921100040.GE24902@pasky.or.cz>
In-Reply-To
<1127183120.31115.34.camel@dv>

Dear diary, on Tue, Sep 20, 2005 at 04:25:20AM CEST, I got a letter where Pavel Roskin <proski@gnu.org> told me that...

> Don't ever assume object type in cg-object-id.
> 
> If type is unknown in normalize_id(), make it empty so it's checked
> later.  Check parent ID that it's a commit.

Why? In most of the cases, you have one pointless fork() more, and we "assume" only if it was in a parent line, and if that's not a commit, you've got a *serious* problem with your database. fsck should yell you to death, and I don't think you could even normally commit such a commit, so this should never happen. There's no point in wasting time trying to handle seriously messed up database.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Previous: Pavel RoskinNext: Pavel Roskin
Message 2 of 8 in “cogito: Don't ever assume object type in cg-object-id”
  1. 6/8 cogito: Don't ever assume object type in cg-object-idPavel Roskin, Sep 20, 2005
  2. Petr BaudisSep 21, 2005
  3. Pavel RoskinSep 22, 2005
  4. Petr BaudisSep 22, 2005
  5. Petr BaudisSep 22, 2005
  6. Pavel RoskinSep 22, 2005
  7. Petr BaudisSep 22, 2005
  8. Pavel RoskinSep 22, 2005

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.