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

Bugs in sub argsfromdir of git-cvsserver

From
LLe <le_wen@distributel.ca>
Date
Dec 22, 2008, 20:33 UTC
Message-ID
<494FF9A9.9060706@distributel.ca>
Hi, all,

I found a bug in git-cvsserver. sub argsfromdir {

    if ( scalar(@{$state->{args}}) == 1 )
    {
        my $arg = $state->{args}[0];
        #$arg .= $state->{prependdir} if ( defined ( 
$state->{prependdir} ) );
        $arg = $state->{prependdir} . $arg if ( defined ( 
$state->{prependdir} ) );
        $log->info("Only one arg specified, checking for directory 
expansion on '$arg'");
...
    }
...
}
It makes not sense of the above remarked out code.

But when I use the code followed remarked out, I have problem to use cvs diff or cvs log in a sub directory of the root (may other commands as well). Eg.:

I have a project called test1 and in test1 there is a test2 subdirectory and a file test2/test3.txt. I have no problem to cvs diff and cvs log in test1 directory. But if I enter test1/test2 to check these commands then they are not working.

I tried to fixed the problem to remarked out the code: #$filename = filecleanup($filename); in req_log and req_diff, then both cvs diff and cvs log work.

In sub filecleanup { ... $filename = $state->{prependdir} . $filename; return $filename; }

inserts $state->{prependdir} into the $filename.
But I don't know if what I did brings incompatibilities.
Can anybody check this issue?
Thanks!
Le Wen
Next: Le
Message 1 of 2 in “Bugs in sub argsfromdir of git-cvsserver”
  1. LeDec 22, 2008
  2. LeDec 22, 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.