9

Just gitk or gitk --all can try to fill up all memory on big repository.

I know than I can gitk -n 1000 to limit it. Also I can killall git (or even Alt+SysRq+F if haven't stopped it in time) to stop it in middle of thrashing.

Is there more proper way to make gitk don't load more commits and stop it's git subprocess without hacks or lengthy gitk restart?

Vi.
  • 37,014
  • 18
  • 93
  • 148
  • I don't see what's wrong with `gitk -n 1000`. You can even alias `gitk --all -n 1000 --whatever-other-options-you-like` to `gitk`. – Tyler Mar 10 '11 at 03:16
  • 1
    @MatrixFrog, Because of I don't know how many commits I need until I see the commit I am looking for. And I want to use one command for accessing recent commits and deep history i.e. don't think about whether it is deep or recent before seeing commit messages. – Vi. Mar 10 '11 at 09:29
  • 1
    'gitk -n' was a lifesaver for me, since gitk was otherwise bringing my system to its knees. I guess I should have read the manual -- you can also limit this by a date-range. – Brent Bradburn Feb 14 '14 at 19:13
  • You're not the only person to find that `gitk` uses up lots of RAM. In part, this seems to have been due to the developers [neglecting to disable an "undo" feature in an underlying Tcl/Tk library](https://public-inbox.org/git/xmqqtwbhbql9.fsf@gitster.mtv.corp.google.com/). That bug was fixed upstream on [18 Jan 2017](https://github.com/git/git/commit/ffac48d093d4b518a0cc0e8bf1b7cb53e0c3d7a2), but people running older versions might not have the fix in place. E.g. Debian 9 Stretch currently ships with `git v2.11.0`, which is dated [29 Nov 2016](https://github.com/git/git/releases/tag/v2.11.0). –  Mar 30 '18 at 14:40

1 Answers1

1

You can also limit gitk by branchname. Instead of using gitk --all to see all branches, just use 'gitk branchname'. This might limit the range of commits.

Sardaukar
  • 29,034
  • 5
  • 26
  • 32