Revert "gitk: Only restore window size from ~/.gitk, not position"

This reverts commit b9bee11526ec (gitk: Only restore window size from
~/.gitk, not position, 2008-03-10).

The earlier commit e9937d2a03a4 (Make gitk work reasonably well on
Cygwin, 2007-02-01) reworked the window layout considerably. Much of
this became irrelevant around 2011 after Cygwin gained an X11 server
and switched to a supportable port of the Unix/X11 Tcl/Tk (it is now
on the current 8.6 code base).

Part of the necessary change was to restore the window size across
sessions, but the position was also restored. This raised complaints
on the mailing list[*], because Gitk was opened on the wrong monitor.
b9bee11526ec was the compromise, because it was only the size that
mattered for the Cygwin layout engine to work.

I personally, find it annoying when Gitk pops up on a random location
on the screen, in particular, since many other applications restore
the window positions across sessions, so why not Gitk as well? (I do
not operate multi-monitor setups, so I cannot test the case.)

[*] https://lore.kernel.org/git/47AAA254.2020008@thorn.ws/

Helped-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
1 file changed
tree: 14253f585a961459774fe0788e195b089dfb6a8c
  1. po/
  2. .gitignore
  3. generate-tcl.sh
  4. gitk
  5. Makefile
  6. meson.build
  7. README.md
README.md

Gitk - The Git Repository Browser

Gitk is a graphical Git repository browser. It displays the commit history of a Git repository as a graph, showing the relationships between commits, branches, and tags.

Usage

To view the history of the current repository:

gitk

To view the history of specific files or directories:

gitk path/to/file
gitk path/to/directory

To view a specific branch or range of commits:

gitk branch-name
gitk v1.0..v2.0

For more usage examples and options, see the gitk manual.

Building

Gitk is a Tcl/Tk application. It requires Tcl/Tk to be installed on your system.

Running directly

Gitk can be run from the source directory without installation:

./gitk

This allows for quick testing of changes.

Installation

To install system-wide, you can use either make or meson:

# Install to default location ($HOME/bin)
make install

# Install to system-wide location
sudo make install prefix=/usr/local

# Install to custom location
make install prefix=/opt/gitk

# Using Meson
meson setup builddir
meson compile -C builddir
meson install -C builddir

Both build systems will handle setting the correct Tcl/Tk interpreter path and installing translation files.

Contributing

Contributions are welcome! The preferred method for submitting patches is via email to the Git mailing list, as this allows for more thorough review and broader community feedback. However, GitHub pull requests are also accepted.

All commits must be signed off (use git commit --signoff) and should have commit messages prefixed with gitk:.

Email Patches

Send patches to git@vger.kernel.org and CC j6t@kdbg.org. See the Git project's patch submission guidelines for detailed instructions on creating and sending patches.

License

Gitk is distributed under the GNU General Public License, either version 2, or (at your option) any later version.