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

Re: [PATCH] gitweb: return correct HTTP status codes

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 17, 2008, 22:54 UTC
Message-ID
<200806180054.33490.jnareb@gmail.com>
In-Reply-To
<48583A73.7020508@gmail.com>
Lea Wiemann wrote:
Show 7 quoted lines
> Jakub Narebski wrote:
> >
> > But that means checking arguments in the "fast path", which means
> > additional calls to git commands in the _common_ case, not only in
> > the case of errors.
> 
> No, it doesn't, it just pipes stuff into cat-file --batch-check,

Ah, O.K., it does add additional call to git command, which should not matter much performance wise on sane operating systems; it would matter on OS with slow fork, like MS Windows, if gitweb ran on Windows (perhaps it can, but certainly not with ActiveState Perl, IIRC).

But what are arguments for "check params; run command" vs "run command; check params if error" proposed by Junio? Why do you want to check parameters upfront? Does it make code much, much easier?

> which has to be opened on virtually any call to gitweb.

IIRC it is for checking parameters? Even then, using it only on "slow patch", i.e. in preence of error might be better solution.

Or is it needed for something else too?
> Before telling me about the performance of my code, can you please
> (a) read it [...]
By the way, would you be sending your current WIP for review?

P.S. I wanted to ask in another subthread if adding object oriented interface (wrapper) to git repositories (similar to the one used by StGIT / git-python perhaps?) is really needed for implementing gitweb caching?; I still think that you have to chose which spots to cache, and do it from gitweb, and not cache everything. But if it is needed for sane error reporting, and perhaps better ETags...

-- 
Jakub Narebski
Poland
Previous: Lea WiemannNext: Lea Wiemann
Message 12 of 25 in “gitweb: return correct HTTP status codes”
  1. gitweb: return correct HTTP status codesLea Wiemann, Jun 15, 2008
  2. Jakub NarebskiJun 15, 2008
  3. Lea WiemannJun 16, 2008
  4. Jakub NarebskiJun 16, 2008
  5. Lea WiemannJun 16, 2008
  6. Jakub NarebskiJun 16, 2008
  7. Lea WiemannJun 17, 2008
  8. Junio C HamanoJun 16, 2008
  9. Lea WiemannJun 17, 2008
  10. Jakub NarebskiJun 17, 2008
  11. Lea WiemannJun 17, 2008
  12. Jakub NarebskiJun 17, 2008
  13. Lea WiemannJun 17, 2008
  14. Jakub NarebskiJun 18, 2008
  15. Lea WiemannJun 18, 2008
  16. Jakub NarebskiJun 18, 2008
  17. Jakub NarebskiJun 16, 2008
  18. gitweb: standarize HTTP status codesLea Wiemann, Jun 18, 2008
  19. Jakub NarebskiJun 19, 2008
  20. Lea WiemannJun 19, 2008
  21. gitweb: standarize HTTP status codesLea Wiemann, Jun 19, 2008
  22. gitweb: standarize HTTP status codesLea Wiemann, Jun 19, 2008
  23. Jakub NarebskiJun 19, 2008
  24. Junio C HamanoJun 20, 2008
  25. Jakub NarebskiJun 19, 2008

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.