Files
git/builtin
Ben Peart fa655d8411 checkout: optimize "git checkout -b <new_branch>"
Skip merging the commit, updating the index and working directory if and
only if we are creating a new branch via "git checkout -b <new_branch>."
Any other checkout options will still go through the former code path.

If sparse_checkout is on, require the user to manually opt in to this
optimzed behavior by setting the config setting checkout.optimizeNewBranch
to true as we will no longer update the skip-worktree bit in the index, nor
add/remove files in the working directory to reflect the current sparse
checkout settings.

For comparison, running "git checkout -b <new_branch>" on a large repo takes:

14.6 seconds - without this patch
0.3 seconds - with this patch

Signed-off-by: Ben Peart <Ben.Peart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-08-16 11:54:57 -07:00
..
2018-05-30 14:04:05 +09:00
2018-06-25 13:22:38 -07:00
2017-10-06 10:07:18 +09:00
2018-07-24 14:50:51 -07:00
2018-05-13 10:45:05 +09:00
2018-07-18 12:20:28 -07:00
2018-07-24 14:50:46 -07:00
2017-10-07 16:27:55 +09:00
2018-06-25 13:22:36 -07:00
2018-05-08 15:59:16 +09:00
2018-05-30 14:04:10 +09:00
2018-05-30 14:04:05 +09:00
2018-06-01 15:06:37 +09:00
2018-06-01 15:06:40 +09:00
2018-06-01 15:06:38 +09:00
2018-05-23 14:38:15 +09:00
2018-07-18 12:20:28 -07:00
2018-05-30 14:04:05 +09:00
2018-07-18 12:20:28 -07:00
2018-07-18 12:20:28 -07:00
2018-07-18 12:20:28 -07:00
2018-07-18 12:20:28 -07:00
2018-04-16 13:52:29 +09:00
2018-07-18 12:20:28 -07:00
2017-12-13 11:15:14 -08:00
2018-05-30 14:04:05 +09:00
2018-03-15 12:01:08 -07:00
2018-05-29 00:28:22 +09:00
2018-07-18 12:20:28 -07:00
2018-05-30 14:04:07 +09:00
2018-05-08 15:59:16 +09:00