git/lib
Johannes Sixt f823de75a1 git-gui: Remove forced rescan of stat-dirty files.
It is possible that stat information of tracked files is modified without
actually modifying the content. Plumbing commands would detect such files
as modified, so that Git GUI runs `git update-info --refresh` in order to
synchronize the cached stat info with the reality. However, this can be
an expensive operation in large repositories. As remediation,
e534f3a886 (git-gui: Allow the user to disable update-index --refresh
during rescan, 2006-11-07) introduced an option to skip the expensive
part.

The option was named "trust file modification timestamp". But the catch
is that sometimes file timestamps can't be trusted. In this case, a file
would remain listed in Unstaged Changes although there are no changes.
So 16403d0b1f (git-gui: Refresh a file if it has an empty diff,
2006-11-11) introduced a popup message informing the user about the
situation and then removed the file from the Unstaged Changes list.

Now users had to click away the message box for every file that was
stat-dirty. Under the assumption that a file in such a state is not
the only one, 124355d32c (git-gui: Always start a rescan on an empty
diff, 2007-01-22) introduced a forced (potentially expensive) refresh
that would de-list all stat-dirty files after the first notification was
dismissed.

Along came 6c510bee20 (Lazy man's auto-CRLF, 2007-02-13) in Git. It
introduced a new case where a file in the worktree can have no essential
differences to the staged version, but still be detected as modified by
plumbing commands. This time, however, the index cannot be synchronized
fully by `git update-index --refresh`, so that the file remains listed
in Unstaged Changes until it is staged manually.

Needless to say that the message box now becomes an annoyance, because
it must be dismissed every time an affected file is selected, and the
file remains listed nevertheless.

Remove the message box. Write the notice that no differences were found
in the diff panel instead. Also include a link that, when clicked,
initiates the rescan. With this scheme, the rescan does not happen
automatically anymore, but requires an additional click. (This is now
two clicks in total for users who encounter stat-dirty files after
enabling the "trust file modification timestamps" option.) However,
users whom the rescan does not help (autocrlf-related dirty files) save
half the clicks because there is no message box to dismiss.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2024-08-03 18:56:35 +02:00
..
about.tcl git-gui: use themed tk widgets with Tk 8.5 2010-01-27 17:13:52 -08:00
blame.tcl git-gui: blame: prevent tool tips from sticking around after Command-Tab 2020-10-17 15:04:35 +05:30
branch.tcl git gui: fix branch name encoding error 2019-12-10 02:43:55 +05:30
branch_checkout.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
branch_create.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
branch_delete.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
branch_rename.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
browser.tcl git-gui: unicode file name support on windows 2016-10-06 09:21:50 +01:00
checkout_op.tcl git-gui: update status bar to track operations 2019-12-06 00:12:15 +05:30
choose_font.tcl git-gui: use themed tk widgets with Tk 8.5 2010-01-27 17:13:52 -08:00
choose_repository.tcl git-gui - remove obsolete Cygwin specific code 2023-08-24 16:19:57 +02:00
choose_rev.tcl git-gui: set suitable extended window manager hints. 2011-10-19 14:26:29 +01:00
chord.tcl git-gui: create a new namespace for chord script evaluation 2020-03-17 18:48:54 +05:30
class.tcl git-gui: set suitable extended window manager hints. 2011-10-19 14:26:29 +01:00
commit.tcl Revert "git-gui: remove lines starting with the comment character" 2021-03-04 13:53:27 +05:30
console.tcl git-gui: allow closing console window with Escape 2019-12-19 01:22:53 +05:30
database.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
date.tcl git-gui: Localize commit/author dates when displaying them 2007-09-10 01:54:16 -04:00
diff.tcl git-gui: Remove forced rescan of stat-dirty files. 2024-08-03 18:56:35 +02:00
encoding.tcl doc: switch links to https 2024-05-05 16:49:00 +02:00
error.tcl git-gui i18n: mark string in lib/error.tcl for translation 2016-10-03 23:40:23 +01:00
git-gui.ico git-gui: Improve the application icon on Windows. 2007-12-02 23:05:10 -05:00
index.tcl Subject: git-gui: fix syntax error because of missing semicolon 2020-04-22 18:32:44 +05:30
line.tcl git-gui: theme the search and line-number entry fields on blame screen 2011-10-19 12:44:39 +01:00
logo.tcl git-gui: Refactor Henrik Nyh's logo into its own procedure 2007-10-10 01:12:15 -04:00
merge.tcl git-gui: add missing close bracket 2020-02-17 21:34:45 +05:30
mergetool.tcl Subject: git-gui: fix syntax error because of missing semicolon 2020-04-22 18:32:44 +05:30
option.tcl git-gui i18n: internationalize use of colon punctuation 2016-10-03 23:39:56 +01:00
remote.tcl git-gui: Mark 'All' in remote.tcl for translation 2016-10-20 11:13:03 +01:00
remote_add.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
remote_branch_delete.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
search.tcl git-gui: use a tristate to control the case mode in the searchbar 2011-10-21 22:28:23 +01:00
shortcut.tcl git-gui - use mkshortcut on Cygwin 2023-08-24 16:19:57 +02:00
spellcheck.tcl git-gui: correct spelling errors in comments 2013-11-15 20:44:08 +00:00
sshkey.tcl git-gui: search for all current SSH key types 2018-03-02 15:13:10 -08:00
status_bar.tcl git-gui: update status bar to track operations 2019-12-06 00:12:15 +05:30
themed.tcl git-gui: use gray background for inactive text widgets 2020-12-19 01:00:17 +05:30
tools.tcl git-gui: support for $FILENAMES in tool definitions 2016-10-03 23:27:14 +01:00
tools_dlg.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
transport.tcl git-gui: fix incorrect use of Tcl append command 2016-10-03 23:40:10 +01:00
win32.tcl git-gui: fix shortcut creation on cygwin 2010-07-30 10:05:26 +01:00
win32_shortcut.js git-gui: Use proper Windows shortcuts instead of bat files 2007-10-12 23:07:58 -04:00