Files
git/builtin
Martin von Zweigbergk 10746a3616 reset $pathspec: no need to discard index
Since 34110cd (Make 'unpack_trees()' have a separate source and
destination index, 2008-03-06), the index no longer gets clobbered by
do_diff_cache() and we can remove the code for discarding and
re-reading it.

There are two paths to update_index_refresh() from cmd_reset(), but on
both paths, either read_cache() or read_cache_unmerged() will have
been called, so the call to read_cache() in this method is redundant
(although practically free).

This speeds up "git reset -- ." a little on the linux-2.6 repo (best
of five, warm cache):

        Before      After
real    0m0.093s    0m0.080s
user    0m0.040s    0m0.020s
sys     0m0.050s    0m0.050s

Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-15 09:38:06 -08:00
..
2012-09-14 11:53:53 -07:00
2012-09-17 15:59:34 -07:00
2012-10-25 06:42:27 -04:00
2012-11-20 10:32:10 -08:00
2012-09-27 17:57:26 -07:00
2013-01-09 08:27:09 -08:00
2012-09-11 11:36:05 -07:00
2012-10-25 06:42:27 -04:00
2012-09-14 11:53:53 -07:00
2012-11-26 13:27:45 -08:00
2012-10-29 03:08:30 -04:00
2012-11-29 12:52:30 -08:00
2012-10-25 06:42:27 -04:00