author | Shawn O. Pearce <spearce@spearce.org> | |
Fri, 20 Jul 2007 07:56:06 +0000 (03:56 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 21 Jul 2007 09:00:37 +0000 (05:00 -0400) | ||
commit | dba07411da8debf9e39bf8d28f642b09c5794aff | |
tree | 51fbdef4f9db9ccfd33ee6ac849d9ec1661f77fd | tree | snapshot |
parent | eea1ab6e23db4c929500fb11464a438b0ba569f0 | commit | diff |
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>
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>
lib/checkout_op.tcl | diff | blob | history |