{"thread":{"id":"16837","subject":"Bugs in sub argsfromdir of git-cvsserver","startedAt":"2008-12-22T20:33:45Z","lastAt":"2008-12-22T21:42:23Z","messageCount":2,"participants":["Le"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"98554","messageId":"494FF9A9.9060706@distributel.ca","threadId":"16837","inReplyTo":null,"subject":"Bugs in sub argsfromdir of git-cvsserver","fromName":"Le","fromEmail":"le_wen@distributel.ca","sentAt":"2008-12-22T20:33:45Z","receivedAt":"2008-12-22T20:33:45Z","isPatch":false,"sender":{"key":"le_wen@distributel.ca","avatar":null},"body":"Hi, all,\n\nI found a bug in git-cvsserver.\nsub argsfromdir\n{\n\n    if ( scalar(@{$state->{args}}) == 1 )\n    {\n        my $arg = $state->{args}[0];\n        #$arg .= $state->{prependdir} if ( defined ( \n$state->{prependdir} ) );\n        $arg = $state->{prependdir} . $arg if ( defined ( \n$state->{prependdir} ) );\n        $log->info(\"Only one arg specified, checking for directory \nexpansion on '$arg'\");\n...\n    }\n...\n}\n\nIt makes not sense of the above remarked out code.\n\nBut when I use the code followed remarked out, I have problem to use cvs \ndiff or cvs log in a sub directory of the root (may other commands as \nwell). Eg.:\n\nI have a project called test1 and in test1 there is a test2 subdirectory \nand a file test2/test3.txt.\nI have no problem to cvs diff and cvs log in test1 directory. But if I \nenter test1/test2 to check these commands then they are not working.\n\nI tried to fixed the problem to remarked out the code:\n#$filename = filecleanup($filename);\nin req_log and req_diff, then both cvs diff and cvs log work.\n\nIn\nsub filecleanup\n{\n...\n$filename = $state->{prependdir} . $filename;\nreturn $filename;\n}\n\ninserts $state->{prependdir} into the $filename.\n\nBut I don't know if what I did brings incompatibilities.\n\nCan anybody check this issue?\n\nThanks!\n\nLe Wen\n"},{"id":"98563","messageId":"495009BF.3070306@distributel.ca","threadId":"16837","inReplyTo":"494FF9A9.9060706@distributel.ca","subject":"Re: Bugs in sub argsfromdir of git-cvsserver","fromName":"Le","fromEmail":"le_wen@distributel.ca","sentAt":"2008-12-22T21:42:23Z","receivedAt":"2008-12-22T21:42:23Z","isPatch":false,"sender":{"key":"le_wen@distributel.ca","avatar":null},"body":"Le wrote:\n> Hi, all,\n>\n> I found a bug in git-cvsserver.\n> sub argsfromdir\n> {\n>\n>    if ( scalar(@{$state->{args}}) == 1 )\n>    {\n>        my $arg = $state->{args}[0];\n>        #$arg .= $state->{prependdir} if ( defined ( \n> $state->{prependdir} ) );\n>        $arg = $state->{prependdir} . $arg if ( defined ( \n> $state->{prependdir} ) );\n>        $log->info(\"Only one arg specified, checking for directory \n> expansion on '$arg'\");\n> ...\n>    }\n> ...\n> }\n>\n> It makes not sense of the above remarked out code.\n>\n> But when I use the code followed remarked out, I have problem to use \n> cvs diff or cvs log in a sub directory of the root (may other commands \n> as well). Eg.:\n>\n> I have a project called test1 and in test1 there is a test2 \n> subdirectory and a file test2/test3.txt.\n> I have no problem to cvs diff and cvs log in test1 directory. But if I \n> enter test1/test2 to check these commands then they are not working.\n>\n> I tried to fixed the problem to remarked out the code:\n> #$filename = filecleanup($filename);\n> in req_log and req_diff, then both cvs diff and cvs log work.\n>\n> In\n> sub filecleanup\n> {\n> ...\n> $filename = $state->{prependdir} . $filename;\n> return $filename;\n> }\n>\n> inserts $state->{prependdir} into the $filename.\n>\n> But I don't know if what I did brings incompatibilities.\n>\n> Can anybody check this issue?\n>\n> Thanks!\n>\n> Le Wen\n> -- \n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\nIt seems that req_up and req_status need to be changed as well. I am not \nwhich subs need to be changed.\n\nLe Wen\n"}]}