threads / discuss / 11720

git-cvsserver will crash for multi-rooted history

Subject: git-cvsserver will crash for multi-rooted history

## tl;dr

One message between Jan 24, 2008 and Jan 24, 2008.

replies: 0people: 1as markdown or json

Steffen Prohaska· Jan 24, 2008, 16:24 UTC · lore

git-cvsserver in master will crash if the history has multiple roots. The problem is that git-merge-base might fail to find a merge base and this situation is not handled by git-cvsserver.

Unfortunately, I'll not have time to address this immediately; but it is a bug in current master, so I think at least you should now. Here is the code ...

2540 # git-merge-base can potentially (but rarely) throw 2541 # several candidate merge bases. let's assume 2542 # that the first one is the best one. 2543 if ($parent eq $lastpicked) { 2544 next; 2545 } 2546 my $base = safe_pipe_capture('git-merge-base', 2547 $lastpicked, $parent);

... the line above will fail.

2548 chomp $base; 2549 if ($base) { 2550 my @merged; 2551 # print "want to log between $base $parent \n"; 2552 open(GITLOG, '-|', 'git-log', "$base.. $parent")

	Steffen

← back to recent threads