Hacker News new | ask | show | jobs
by kschults 5106 days ago
Is there a way to limit this to the most recent N (either hard-coded or as an input) entries? It's a bit slow to load when it has to load all of the history ever, and I usually only care about at most the last couple dozen commits.
1 comments

The built in automatic paging in git already makes sure it does not have to load all history. And --graph is what makes it slow. Adding a limit with git lg -10 seems to take about the same time as with no limit at all.
Ah, thanks for the correction.

Knowing that, this doesn't really matter, but "git lg -10" produces no output at all for me.

Really? "git lg -10" works perfectly for me, exactly as I expect. Did you add a "--" to the end accidentally, maybe?
Indeed I was. That was in the shortcut when I originally looked at it. He has since edited it out. Thanks!