Git with broken hash generation to generate collisions between object IDs. Don't use this! https://undefinedbehavior.de/posts/commit-vandalism/
Go to file
Johannes Schindelin 2365e5b174 git-gui: avoid exception upon Ctrl+T in an empty list
Previously unstaged files can be staged by clicking on them and then
pressing Ctrl+T. Conveniently, the next unstaged file is selected
automatically so that the unstaged files can be staged by repeatedly
pressing Ctrl+T.

When a user hits Ctrl+T one time too many, though, Git GUI used to throw
this exception:

	expected number but got ""
	expected number but got ""
	    while executing
	"expr {int([lindex [$w tag ranges in_diff] 0])}"
	    (procedure "toggle_or_diff" line 13)
	    invoked from within
	"toggle_or_diff toggle .vpane.files.workdir.list "
	    (command bound to event)

Let's just avoid that by skipping the operation when there are no more
files to stage.

This fixes https://github.com/git-for-windows/git/issues/1060

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-09 11:02:40 -08:00
lib git gui: fix staging a second line to a 1-line file 2018-01-09 11:02:40 -08:00
macosx git-gui: Make git-gui lib dir configurable at runime 2014-08-10 12:48:28 +01:00
po git-gui i18n: Updated Bulgarian translation (565,0f,0u) 2016-10-20 11:12:50 +01:00
windows git-gui: chmod +x po2msg, windows/git-gui.sh 2014-01-18 17:06:41 +00:00
.gitattributes git-gui: set whitespace warnings appropriate to this project 2011-11-30 11:35:28 +00:00
.gitignore git-gui: Honor a config.mak in git-gui's top level 2007-10-13 22:14:14 -04:00
git-gui--askpass git-gui: ensure correct application termination in git-gui--askpass 2010-08-18 23:19:24 +01:00
git-gui.sh git-gui: avoid exception upon Ctrl+T in an empty list 2018-01-09 11:02:40 -08:00
GIT-VERSION-GEN git-gui: set version 0.21 2016-10-20 11:19:43 +01:00
Makefile git-gui: sort entries in tclIndex 2015-05-01 15:53:06 +01:00