summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ce0316)
raw | patch | inline | side by side (parent: 8ce0316)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 22 Jan 2007 22:10:38 +0000 (17:10 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 22 Jan 2007 22:10:38 +0000 (17:10 -0500) |
Its possible for external programs to update file modification dates of
many files within a repository. I've seen this on Windows with a popular
virus scanner, sadly enough. If the user has Trust File Modification
Timestamp enabled and the virus scanner touches a large number of files
it can be annoying trying to clear them out of the 'Changed But Not
Updated' file list by clicking on them one at a time to load the diff.
So now we force a rescan as soon as one such file is found, and for
just that rescan we disable the Trust File Modification Timestamp option
thereby allowing Git to update the modification dates in the index.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
many files within a repository. I've seen this on Windows with a popular
virus scanner, sadly enough. If the user has Trust File Modification
Timestamp enabled and the virus scanner touches a large number of files
it can be annoying trying to clear them out of the 'Changed But Not
Updated' file list by clicking on them one at a time to load the diff.
So now we force a rescan as soon as one such file is found, and for
just that rescan we disable the Trust File Modification Timestamp option
thereby allowing Git to update the modification dates in the index.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 396a44e65455db98783026c5806bcb00c12c4232..2350baa3a36d35f17167bc2f04061ccfbb222d98 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
return $empty_tree
}
-proc rescan {after} {
+proc rescan {after {honor_trustmtime 1}} {
global HEAD PARENT MERGE_HEAD commit_type
global ui_index ui_workdir ui_status_value ui_comm
global rescan_active file_states
$ui_comm edit modified false
}
- if {$repo_config(gui.trustmtime) eq {true}} {
+ if {$honor_trustmtime && $repo_config(gui.trustmtime) eq {true}} {
rescan_stage2 {} $after
} else {
set rescan_active 1
the Trust File Modification Timestamps option
enabled, so Git did not automatically detect
that there are no content differences in this
-file.
-
-This file will now be removed from the modified
-files list, to prevent possible confusion.
-"
- if {[catch {exec git update-index -- $path} err]} {
- error_popup "Failed to refresh index:\n\n$err"
- }
+file."
clear_diff
display_file $path __
+ rescan {set ui_status_value {Ready.}} 0
}
proc show_diff {path w {lno {}}} {