# git-rev-list --merge-order hangs

5 messages from 2005-06-08 to 2005-06-08. Participants: Radoslaw Szkodzinski, Jon Seymour.
Thread: https://gitlist.dev/t/859

## Radoslaw Szkodzinski, 2005-06-08 06:50

Subject: git-rev-list --merge-order hangs
Message-ID: <42A69550.1030105@gorzow.mm.pl>
URL: https://gitlist.dev/e/42A69550.1030105%40gorzow.mm.pl

```
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, 2005-06-08 07:22

Subject: Re: git-rev-list --merge-order hangs
Message-ID: <2cfc4032050608002258e58897@mail.gmail.com>
URL: https://gitlist.dev/e/2cfc4032050608002258e58897%40mail.gmail.com
In-Reply-To: <42A69550.1030105@gorzow.mm.pl>

```
On 6/8/05, Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl> wrote:
> 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, 2005-06-08 09:02

Subject: Re: git-rev-list --merge-order hangs
Message-ID: <2cfc4032050608020215152887@mail.gmail.com>
URL: https://gitlist.dev/e/2cfc4032050608020215152887%40mail.gmail.com
In-Reply-To: <2cfc403205060800337e1ecca0@mail.gmail.com>

```
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, 2005-06-08 14:17

Subject: Re: git-rev-list --merge-order hangs
Message-ID: <2cfc40320506080717585bf939@mail.gmail.com>
URL: https://gitlist.dev/e/2cfc40320506080717585bf939%40mail.gmail.com
In-Reply-To: <2cfc4032050608020215152887@mail.gmail.com>

```
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, 2005-06-08 15:28

Subject: Re: git-rev-list --merge-order hangs
Message-ID: <42A70E81.7090308@gorzow.mm.pl>
URL: https://gitlist.dev/e/42A70E81.7090308%40gorzow.mm.pl
In-Reply-To: <2cfc4032050608020215152887@mail.gmail.com>

```
Jon Seymour wrote:

>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

```
