threads / discuss / 859

git-rev-list --merge-order hangs

Subject: git-rev-list --merge-order hangs

## tl;dr

5 messages between Jun 8, 2005 and Jun 8, 2005.

replies: 4people: 2as markdown or json

Radoslaw Szkodzinski· Jun 8, 2005, 06:50 UTC · lore

I've got a Linux git tree with some merges and some other commits interwined. I want to print all my changes in merge order, so I do:

git-rev-list --pretty --merge-order v2.6.12-rc6-astorm1 ^v2.6.12-rc6

It prints the first 3 commits (linear), but then hangs, eating all available CPU. Without --merge-order it works fine, but obviously lists the commits by parent.

AstralStorm
Jon Seymour· Jun 8, 2005, 07:22 UTC · re: Radoslaw Szkodzinski · lore

Re: git-rev-list --merge-order hangs

On 6/8/05, Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> wrote:
Show 10 quoted lines
> I've got a Linux git tree with some merges and some other commits
> interwined.
> I want to print all my changes in merge order, so I do:
> 
> git-rev-list --pretty --merge-order v2.6.12-rc6-astorm1 ^v2.6.12-rc6
> 
> It prints the first 3 commits (linear), but then hangs, eating all
> available CPU.
> Without --merge-order it works fine, but obviously lists the commits by
> parent.

Can you git-rev-list >/dev/null without arguments, then do a git-rev-list --pretty --merge-order again and see it works any better?

If it still doesn't work, can you send me the output of:
        git-rev-list --parents v2.6.12-rc6-astorm1 ^v2.6.12-rc6 

I may then need to request a tarball of the related git objects so that I can reproduce the problem on my end, but I'll send you the list I need to see.

Regards,
jon.
Jon Seymour· Jun 8, 2005, 09:02 UTC · lore

Re: git-rev-list --merge-order hangs

Actually, one case that I may not have considered properly is a commit near the head that has no parents.

      git-rev-list --parents v2.6.12-rc6-astorm1 ^v2.6.12-rc6

should tell you if this case exists. Ideally such a case should not occur, but that isn't a logical certainity, so I should handle it better than I currently do.

Please let me know if this may explain your case. 
Regards,
jon.
Jon Seymour· Jun 8, 2005, 14:17 UTC · re: Jon Seymour · lore

Re: git-rev-list --merge-order hangs

Ok, I reproduced exponential behaviour when a commit with no parents is merged near the head of the kernel and a ^ argument is specified.

Fortunately a work-around is a one line change - a patch will be forthcoming shortly. The workaround will still require a full-graph scan but that is linear rather than exponential so is tolerable.

A better solution which will not require a full-graph scan will be delivered in a future patch.

Thanks for the report.
jon.
Radoslaw Szkodzinski· Jun 8, 2005, 15:28 UTC · re: Jon Seymour · lore

Re: git-rev-list --merge-order hangs

Jon Seymour wrote:
Show 12 quoted lines
>Actually, one case that I may not have considered properly is a commit
>near the head that has no parents.
>
>      git-rev-list --parents v2.6.12-rc6-astorm1 ^v2.6.12-rc6
>
>should tell you if this case exists. Ideally such a case should not
>occur, but that isn't a logical certainity, so I should handle it
>better than I currently do.
>
>Please let me know if this may explain your case. 
>  
>

This just threw tons of SHA1 hashes at me without complaining. I've also tried git-rev-list HEAD >/dev/null without any chage whatsoever.

The tree is not secret, You can try (very slow) rsync at: rsync://astralstorm.servegame.com/linux-2.6-astorm

Just update latest linux-2.6 with it to save time. (mine is up to commit 1d6757fbff5bc86e94e59ab0d7bdd7e71351d839)

AstralStorm

← back to recent threads