Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-02-07 Thread Junio C Hamano
Junio C Hamano writes: >>> This was a bit painful change, given that some changes in flight do >>> add new callsites to read_index_from() and they got the function >>> changed under their feet. >> >> Sorry about that. Is there any way to make such a change less painful >> in the future? > > One

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-27 Thread Thomas Gummerer
On 01/21, Junio C Hamano wrote: > Thomas Gummerer writes: > > > On 01/19, Junio C Hamano wrote: > >> Thomas Gummerer writes: > >> > >> > read_cache_from() defaults to using the gitdir of the_repository. As it > >> > is mostly a convenience macro, having to pass get_git_dir() for every > >> > c

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-21 Thread Junio C Hamano
Thomas Gummerer writes: > On 01/19, Junio C Hamano wrote: >> Thomas Gummerer writes: >> >> > read_cache_from() defaults to using the gitdir of the_repository. As it >> > is mostly a convenience macro, having to pass get_git_dir() for every >> > call seems overkill, and if necessary users can h

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-20 Thread Thomas Gummerer
On 01/19, Junio C Hamano wrote: > Thomas Gummerer writes: > > > read_cache_from() defaults to using the gitdir of the_repository. As it > > is mostly a convenience macro, having to pass get_git_dir() for every > > call seems overkill, and if necessary users can have more control by > > using rea

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-19 Thread Junio C Hamano
Thomas Gummerer writes: > read_cache_from() defaults to using the gitdir of the_repository. As it > is mostly a convenience macro, having to pass get_git_dir() for every > call seems overkill, and if necessary users can have more control by > using read_index_from(). This was a bit painful chan

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-18 Thread Duy Nguyen
On Thu, Jan 18, 2018 at 1:16 AM, Jonathan Nieder wrote: > Hi, > > Duy Nguyen wrote: >> On Wed, Jan 17, 2018 at 4:42 AM, Brandon Williams wrote: > >>> IIUC Split index is an index extension >>> that can be enabled to limit the size of the index file that is written

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-17 Thread Jonathan Nieder
Hi, Duy Nguyen wrote: > On Wed, Jan 17, 2018 at 4:42 AM, Brandon Williams wrote: >> IIUC Split index is an index extension >> that can be enabled to limit the size of the index file that is written >> when making changes to the index. It breaks the index into tw

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-16 Thread Brandon Williams
On 01/17, Duy Nguyen wrote: > On Wed, Jan 17, 2018 at 4:42 AM, Brandon Williams wrote: > > On 01/07, Thomas Gummerer wrote: > >> read_index_from() takes a path argument for the location of the index > >> file. For reading the shared index in split index mode however it just > >> ignores that path

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-16 Thread Duy Nguyen
On Wed, Jan 17, 2018 at 4:42 AM, Brandon Williams wrote: > On 01/07, Thomas Gummerer wrote: >> read_index_from() takes a path argument for the location of the index >> file. For reading the shared index in split index mode however it just >> ignores that path argument, and reads it from the gitdi

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-16 Thread Brandon Williams
On 01/07, Thomas Gummerer wrote: > read_index_from() takes a path argument for the location of the index > file. For reading the shared index in split index mode however it just > ignores that path argument, and reads it from the gitdir of the current > repository. > > This works as long as an in

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-13 Thread Thomas Gummerer
On 01/08, Thomas Gummerer wrote: > On 01/08, Duy Nguyen wrote: > > On Mon, Jan 8, 2018 at 5:30 AM, Thomas Gummerer > > wrote: > > > @@ -1896,16 +1895,17 @@ int read_index_from(struct index_state *istate, > > > const char *path) > > > split_index->base = xcalloc(1, > > > sizeof(*

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-08 Thread Duy Nguyen
On Tue, Jan 9, 2018 at 6:38 AM, Brandon Williams wrote: > On 01/08, Duy Nguyen wrote: >> On Mon, Jan 8, 2018 at 5:30 AM, Thomas Gummerer wrote: >> > @@ -1896,16 +1895,17 @@ int read_index_from(struct index_state *istate, >> > const char *path) >> > split_index->base = xcalloc(1,

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-08 Thread Brandon Williams
On 01/08, Duy Nguyen wrote: > On Mon, Jan 8, 2018 at 5:30 AM, Thomas Gummerer wrote: > > @@ -1896,16 +1895,17 @@ int read_index_from(struct index_state *istate, > > const char *path) > > split_index->base = xcalloc(1, sizeof(*split_index->base)); > > > > base_sha1_hex = sh

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-08 Thread Thomas Gummerer
On 01/08, Duy Nguyen wrote: > On Mon, Jan 8, 2018 at 5:30 AM, Thomas Gummerer wrote: > > @@ -1896,16 +1895,17 @@ int read_index_from(struct index_state *istate, > > const char *path) > > split_index->base = xcalloc(1, sizeof(*split_index->base)); > > > > base_sha1_hex = sh

Re: [PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-08 Thread Duy Nguyen
On Mon, Jan 8, 2018 at 5:30 AM, Thomas Gummerer wrote: > @@ -1896,16 +1895,17 @@ int read_index_from(struct index_state *istate, const > char *path) > split_index->base = xcalloc(1, sizeof(*split_index->base)); > > base_sha1_hex = sha1_to_hex(split_index->base_sha1); > -

[PATCH v3 1/3] read-cache: fix reading the shared index for other repos

2018-01-07 Thread Thomas Gummerer
read_index_from() takes a path argument for the location of the index file. For reading the shared index in split index mode however it just ignores that path argument, and reads it from the gitdir of the current repository. This works as long as an index in the_repository is read. Once that cha