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

Re: First web interface and service API draft

From
Petr Baudis <pasky@ucw.cz>
Date
Apr 22, 2005, 22:45 UTC
Message-ID
<20050422224554.GG21204@pasky.ji.cz>
In-Reply-To
<20050422142342.GG30915@delft.aura.cs.cmu.edu>

Dear diary, on Fri, Apr 22, 2005 at 04:23:42PM CEST, I got a letter where Jan Harkes <jaharkes@cs.cmu.edu> told me that...

Show 16 quoted lines
> On Fri, Apr 22, 2005 at 12:41:56PM +0200, Christian Meder wrote:
> > -------
> > /<project>/blob/<blob-sha1>
> > /<project>/commit/<commit-sha1>
> 
> It is trivial to find an object when given a sha, but to know the object
> type you'd have to decompress it and check inside. Also the way git
> stores these things you can't have both a blob and a commit with the
> same sha anyways.
> 
> So why not use,
>     /<project/<hexadecimal sha1 representation>
> 	will give you the raw object.
> 
>     /<project/<hexadecimal sha1 representation>.html (.xml/.txt)
> 	will give you a parsed version for user presentation

Because this gives you more type control, and type control is good where it makes sense (i.e. the types are completely orthogonal). It makes sense here - either you _know_ your sha1 is of given type, or you don't know at all what are you doing.

Also, when looking at an URI, you can immediately say what type of object does it point at. I actually consider that a pretty important property.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Jon SeymourNext: Petr Baudis
Message 14 of 16 in “First web interface and service API draft”
  1. Christian MederApr 22, 2005
  2. Jon SeymourApr 22, 2005
  3. Petr BaudisApr 22, 2005
  4. Jon SeymourApr 22, 2005
  5. Christian MederApr 22, 2005
  6. Christian MederApr 22, 2005
  7. Petr BaudisApr 22, 2005
  8. El DraperApr 22, 2005
  9. Christian MederApr 22, 2005
  10. Jon SeymourApr 22, 2005
  11. Jan HarkesApr 22, 2005
  12. Christian MederApr 22, 2005
  13. Jon SeymourApr 23, 2005
  14. Petr BaudisApr 22, 2005
  15. Petr BaudisApr 22, 2005
  16. Christian MederApr 24, 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.