Skip to contentSkip to conversation

git-rev-list --merge-order hangs

DISCUSSION Radoslaw Szkodzinski 2 participants 5 messages Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 10 lines · Radoslaw Szkodzinski

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.

#3 lore raw
In reply to a message not in the archive

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.

#4 lore raw

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.

#5 lore raw
In reply to Jon Seymour
Quoted 12 lines · Jon Seymour

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