зеркало из https://github.com/microsoft/git.git
git-gui: Skip unnecessary read-tree work during checkout
I totally missed this obvious optimization in the checkout code path. If our current repository HEAD is actually at the commit we are moving to, and we agreed to perform this switch earlier, then we have no files to update in the working directory and any stale mtimes are simply not of consequence right now. We can pretend like we ran a read-tree and skip right into the post-read-tree work, such as updating the branch and setting the symbolic-ref. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Родитель
eea1ab6e23
Коммит
dba07411da
|
@ -266,7 +266,9 @@ The rescan will be automatically started now.
|
|||
return
|
||||
}
|
||||
|
||||
if {[is_config_true gui.trustmtime]} {
|
||||
if {$curHEAD eq $new_hash} {
|
||||
_after_readtree $this
|
||||
} elseif {[is_config_true gui.trustmtime]} {
|
||||
_readtree $this
|
||||
} else {
|
||||
ui_status {Refreshing file status...}
|
||||
|
|
Загрузка…
Ссылка в новой задаче