git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC/PATCH 0/8] Add configuration options for split-index
@ 2016-07-11 17:22 Christian Couder
  2016-07-11 17:22 ` [RFC/PATCH 1/8] config: add git_config_get_split_index() Christian Couder
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Christian Couder @ 2016-07-11 17:22 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason,
	Nguyen Thai Ngoc Duy, Christian Couder

Goal
~~~~

We want to make it possible to use the split-index feature
automatically by just setting a new "core.splitIndex" configuration
variable to true.

This can be valuable as split-index can help significantly speed up
`git rebase` especially along with the current work to libify `git
apply`.

Design
~~~~~~

The design is similar as the previous work that introduced
"core.untrackedCache". 

The new "core.splitIndex" configuration option can be either true,
false or undefined which is the default.

When it is true, the split index is created, if it does not already
exists, when the index is read. When it is false, the split index is
removed if it exists, when the index is read. Otherwise it is left as
is.

Highlevel view of the patches in the series
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    - Patches 1/8 to 4/8 introduce the functions that are reading the
      configuration variable and tweaking the split index depending on
      its value.

    - Patches 5/8 and 6/8 add some documentation for the new feature.

    - Patch 7/8 adds a few simple tests.

    - Patch 8/8 cleans up the old "sharedindex.XXXX" previously
      created by split-index.

Future work
~~~~~~~~~~~

One thing that is probably missing is a mechanism to avoid having too
many changes accumulating in the (split) index while in split index
mode. The git-update-index documentation says:

	If split-index mode is already enabled and `--split-index` is
	given again, all changes in $GIT_DIR/index are pushed back to
	the shared index file.

but it is probably better to not expect the user to think about it and
to have a mechanism that pushes back all changes to the shared index
file automatically when some threshold is reached. The threshold could
be for example when $GIT_DIR/index size is larger than 25% of the
shared index size. Opinions, test results or test ideas are welcome on
this.

Links
~~~~~

The last iteration of the git apply libification patch series is
there:

http://thread.gmane.org/gmane.comp.version-control.git/298344/

This patch series is also available here:

https://github.com/chriscool/git/commits/config-split-index


Christian Couder (8):
  config: add git_config_get_split_index()
  split-index: add {add,remove}_split_index() functions
  read-cache: add and then use tweak_split_index()
  update-index: warn in case of split-index incoherency
  Documentation/config: add information for core.splitIndex
  Documentation/git-update-index: talk about core.splitIndex config var
  t1700: add tests for core.splitIndex
  read-cache: unlink old sharedindex files

 Documentation/config.txt           |  4 ++++
 Documentation/git-update-index.txt |  6 ++++++
 builtin/update-index.c             | 20 ++++++++---------
 cache.h                            |  1 +
 config.c                           | 10 +++++++++
 read-cache.c                       | 44 +++++++++++++++++++++++++++++++++++++-
 split-index.c                      | 18 ++++++++++++++++
 split-index.h                      |  2 ++
 t/t1700-split-index.sh             | 44 ++++++++++++++++++++++++++++++++++++++
 9 files changed, 138 insertions(+), 11 deletions(-)

-- 
2.9.0.250.g7087ccc.dirty


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-07-25 21:18 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-11 17:22 [RFC/PATCH 0/8] Add configuration options for split-index Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 1/8] config: add git_config_get_split_index() Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 2/8] split-index: add {add,remove}_split_index() functions Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 3/8] read-cache: add and then use tweak_split_index() Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 4/8] update-index: warn in case of split-index incoherency Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 5/8] Documentation/config: add information for core.splitIndex Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 6/8] Documentation/git-update-index: talk about core.splitIndex config var Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 7/8] t1700: add tests for core.splitIndex Christian Couder
2016-07-11 17:22 ` [RFC/PATCH 8/8] read-cache: unlink old sharedindex files Christian Couder
2016-07-11 18:27   ` Duy Nguyen
2016-07-12  7:04     ` Christian Couder
2016-07-12 15:12       ` Duy Nguyen
2016-07-12 19:45         ` Christian Couder
2016-07-13 15:16           ` Duy Nguyen
2016-07-13 17:54             ` Christian Couder
2016-07-12 16:01 ` [RFC/PATCH 0/8] Add configuration options for split-index Duy Nguyen
2016-07-23 16:11   ` Christian Couder
2016-07-25 16:04     ` Duy Nguyen
2016-07-25 21:18       ` Christian Couder

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).