2

When using gitk to view the history of a large project, like linux, gitk tries to load all the commits in memory which ultimately freezes the whole machine. This is because the history of the project is too big to be held in RAM.

So is there a way to view a few commits first and then the rest, just like pagination in a web application?

I checked the gitk manual (http://git-scm.com/docs/gitk) which specifies the option to give revision range, but this assumes that we know the range to observe from beforehand. Like we cannot tell that first 50 commits lie between these two commits.

The real problem is memory overflow. What i want is gitk to load only a few commits at a time in memory and not the whole history.

Any advice?

Thanks in advance

  • Related: https://stackoverflow.com/questions/5249851/gitk-how-to-tell-it-stop-dont-load-more-commits –  Mar 30 '18 at 14:35
  • Possible duplicate of [gitk: How to tell it "stop, don't load more commits"?](https://stackoverflow.com/questions/5249851/gitk-how-to-tell-it-stop-dont-load-more-commits) –  Mar 30 '18 at 14:35

1 Answers1

1

Gitk does not support this directly (especially loading later revisions on demand). However, you can restrict the range you want to display without knowing exactly what the versions are.

For example, you can show only the last 50 commits by specifying a revision range using the A..B syntax:

 gitk HEAD~50..HEAD

Then, if you need to look at the “next page”, you can adjust the numbers:

 gitk HEAD~100..HEAD~50
poke
  • 369,085
  • 72
  • 557
  • 602
  • Yup... This seems the way... But i still feel gitk should not load full history of the project at the time of viewing... Memory gets choked.... – ravimalik20 Mar 09 '15 at 16:52
  • @ravimalik20 Feel free to send in patches to make it smarter ;) – poke Mar 09 '15 at 18:08