summaryrefslogtreecommitdiff
path: root/Documentation/git-reset.txt
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martinvonz@gmail.com>2013-01-15 05:47:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-15 17:38:08 (GMT)
commit3fde386a40f38dbaa684c17603e71909b862d021 (patch)
tree82a8c1e00ac6fa76d3f8a75e04c70b1e376c2d8e /Documentation/git-reset.txt
parent166ec2e96e31bac913f44823dadd6c732d353172 (diff)
downloadgit-3fde386a40f38dbaa684c17603e71909b862d021.zip
git-3fde386a40f38dbaa684c17603e71909b862d021.tar.gz
git-3fde386a40f38dbaa684c17603e71909b862d021.tar.bz2
reset [--mixed]: use diff-based reset whether or not pathspec was given
Thanks to b65982b (Optimize "diff-index --cached" using cache-tree, 2009-05-20), resetting with paths is much faster than resetting without paths. Some timings for the linux-2.6 repo to illustrate this (best of five, warm cache): reset reset . real 0m0.219s 0m0.080s user 0m0.140s 0m0.040s sys 0m0.070s 0m0.030s These two commands should do the same thing, so instead of having the user type the trailing " ." to get the faster do_diff_cache()-based implementation, always use it when doing a mixed reset, with or without paths (so "git reset $rev" would also be faster). Timing "git reset" shows that it indeed becomes as fast as "git reset ." after this patch. Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-reset.txt')
0 files changed, 0 insertions, 0 deletions