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

Re: gitweb on OpenBSD (-T not supported on filesystems...)

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 17, 2006, 09:12 UTC
Message-ID
<eej3g3$d9j$1@sea.gmane.org>
In-Reply-To
<op.tf0k9fdvqpav6l@crystal.sienna.ath.cx>
Andrew Pamment wrote:
Show 6 quoted lines
> I'm not sure if this is useful but I thought I would post it anyway,
> 
> in gitweb.cgi on line 1560 where you have -T testing a file descripter, it  
> doesn't work on OpenBSD 3.9, which makes viewing blobs not work.
> 
> I solved this (or I think I have) by replacing $fd with $filename.

This doesn't work. $filename is file name relative to the git repository, i.e. full path would be $projectroot/$project/../$file_name _if_ the repository is full repository and not bare repository, and when projects are symlinked .. goes up linked directory.

We need '-T $fd', where $fd is open pipe from git-cat-file, to avoid creating temporary files (we just removed need for $tmp_dir and temporary files for creating diffs).

What Perl version do you use? Does 'perldoc -f -X' has the following lines?
        -X FILEHANDLE
        (...) If "-T" or "-B" is used on a filehandle, the current IO buffer
        is examined rather than the first block. (...)
The solution for you would be to skip -T test.
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Andrew PammentNext: Andrew Pamment
Message 2 of 5 in “gitweb on OpenBSD (-T not supported on filesystems...)”
  1. Andrew PammentSep 17, 2006
  2. Jakub NarebskiSep 17, 2006
  3. Andrew PammentSep 17, 2006
  4. Jakub NarebskiSep 17, 2006
  5. Randal L. SchwartzSep 17, 2006

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.