Git with broken hash generation to generate collisions between object IDs. Don't use this! https://undefinedbehavior.de/posts/commit-vandalism/
Go to file
Alexander Gavrilov 584fa9ccf4 git-gui: Avoid an infinite rescan loop in handle_empty_diff.
If the index update machinery and git diff happen to disagree
on whether a particular file is modified, it may cause git-gui
to enter an infinite index rescan loop, where an empty diff
starts a rescan, which finds the same set of files modified,
and tries to display the diff for the first one, which happens
to be the empty one. A current example of a possible disagreement
point is the autocrlf filter.

This patch breaks the loop by using a global counter to track
the auto-rescans. The variable is reset whenever a non-empty
diff is displayed.

Another suggested approach, which is based on giving the
--exit-code argument to git diff, cannot be used, because
diff-files seems to trust the timestamps in the index, and
returns a non-zero code even if the file is actually
unchanged, which essentially defeats the purpose of the
auto-rescan logic.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-02-08 11:50:11 -08:00
lib git-gui: Avoid an infinite rescan loop in handle_empty_diff. 2009-02-08 11:50:11 -08:00
macosx git-gui: Correct 'Visualize Branches' on Mac OS X to start gitk 2008-07-25 15:08:33 -07:00
po git-gui: Update Hungarian translation for 0.12 2008-12-10 11:44:03 -08:00
windows git-gui (Windows): Change wrapper to execdir 'libexec/git-core' 2008-07-29 22:43:37 -07:00
.gitattributes git-gui: Use gitattribute "encoding" for file content display 2008-09-24 12:48:31 -07: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: Add a simple implementation of SSH_ASKPASS. 2008-11-01 16:01:34 -07:00
git-gui.sh git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL 2008-12-17 07:50:55 -08:00
GIT-VERSION-GEN git-gui 0.12 2008-12-17 20:15:17 -08:00
Makefile git-gui: Add a simple implementation of SSH_ASKPASS. 2008-11-01 16:01:34 -07:00