Stefan Beller writes:
> As the upcoming series will add a lot of functions to the submodule
> header, let's first make the header consistent to the rest of the project
> by adding the extern keyword to functions.
This may be the right thing to do in the longer term but a patch
like this adds a l
Stefan Beller writes:
> @@ -342,6 +313,8 @@ int cmd_rm(int argc, const char **argv, const char
> *prefix)
> exit(0);
> }
>
> + submodules_absorb_gitdir_if_needed(prefix);
> +
> /*
>* If not forced, the file, the index and the HEAD (if exists)
>
Stefan Beller writes:
> As only 0 is understood as false, rename the function to invert the
> meaning, i.e. the return code of 0 signals the removal of the submodule
> is fine, and other values can be used to return a more precise answer
> what went wrong.
Makes sense to rename it as that will c
Hi Junio, and thanks for sharing your thoughts.
You understood it pretty well, except the context "scope". Example does
show a single line change, and a single line old/new comparison, but
that is for simplicity sake of the initial example. What I was
discussing about was the whole patch "hunk" in
On Fri, Dec 23, 2016 at 3:55 PM, Lars Schneider
wrote:
> "next" seems to generate a small error on macOS. Probably introduced in
> "worktree: check if a submodule uses worktrees" (1a248cf)
Thanks for reporting, will send a fix on Tuesday.
On Sat, Dec 24, 2016 at 6:29 PM, Mike Hommey wrote:
> Hi,
>
> As you might be aware, I'm working on a mercurial remote helper for git.
> The way it stores metadata for mercurial manifests abuses "commit"
> references in trees, which are normally used for submodules.
>
> Some operations in the help
The UCL E-Mail Virus Protection System has been triggered by a message you sent.
One or more of the original e-mail attachments have been removed and replaced
with this message.
* The attachment may have contained a virus or malware
* The attachment may have an extension of a type unacceptable f
On Mon, Dec 19, 2016 at 1:02 PM, Duy Nguyen wrote:
> On Sat, Dec 17, 2016 at 03:55:26PM +0100, Christian Couder wrote:
>> 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.
>>
>>
On Mon, Dec 26, 2016 at 11:22 AM, Christian Couder
wrote:
>
> Highlevel view of the patches in the series
> ~~~
>
> Except for patch 1/21, there are 3 big steps, one for each new
> configuration variable introduced.
>
> There only a few small differences bet
Signed-off-by: Christian Couder
---
Documentation/config.txt | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index d51182a060..221c5982c0 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -331,6 +331,10 @@ core.trus
It looks better and is simpler to review when we don't compute
the same things many times in the function.
It will also help make the following commit simpler.
Signed-off-by: Christian Couder
---
read-cache.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/rea
Signed-off-by: Christian Couder
---
Documentation/git-update-index.txt | 6 ++
1 file changed, 6 insertions(+)
diff --git a/Documentation/git-update-index.txt
b/Documentation/git-update-index.txt
index 7386c93162..e091b2a409 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentatio
Signed-off-by: Christian Couder
---
Documentation/config.txt | 11 +++
1 file changed, 11 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index e0f5a77980..24e771d22e 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2786,6 +2786,17 @
Everytime split index is turned on, it creates a "sharedindex."
file in the git directory. This change makes sure that shared index
files that haven't been used for a long time are removed when a new
shared index file is created.
The new "splitIndex.sharedIndexExpire" config variable is create
This function will be used in a commit soon, so let's make
it available globally.
Signed-off-by: Christian Couder
---
cache.h | 3 +++
sha1_file.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/cache.h b/cache.h
index e15b421b6f..f442f28189 100644
--- a/cache.h
+++ b/c
Signed-off-by: Christian Couder
---
t/t1700-split-index.sh | 37 +
1 file changed, 37 insertions(+)
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index 292a0720fc..db8c39f446 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.sh
@@ -2
This function will be used in a following commit to get the expiration
time of the shared index files from the config, and it is generic
enough to be put in "config.c".
Signed-off-by: Christian Couder
---
builtin/gc.c | 15 ++-
cache.h | 3 +++
config.c | 13 +
This new function will be used in a following commit to get the
value of the "splitIndex.maxPercentChange" config variable.
Signed-off-by: Christian Couder
---
cache.h | 1 +
config.c | 15 +++
2 files changed, 16 insertions(+)
diff --git a/cache.h b/cache.h
index c126fe475e..e15b
Signed-off-by: Christian Couder
---
t/t1700-split-index.sh | 72 ++
1 file changed, 72 insertions(+)
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index 507a1dd1ad..f03addf654 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-i
When users are using `git update-index --(no-)split-index`, they
may expect the split-index feature to be used or not according to
the option they just used, but this might not be the case if the
new "core.splitIndex" config variable has been set. In this case
let's warn about what will happen and
Also use the functions in cmd_update_index() in
builtin/update-index.c.
These functions will be used in a following commit to tweak
our use of the split-index feature depending on the setting
of a configuration variable.
Signed-off-by: Christian Couder
---
builtin/update-index.c | 18 ++
When writing a new split-index and there is a big number of cache
entries in the split-index compared to the shared index, it is a
good idea to regenerate the shared index.
By default when the ratio reaches 20%, we will push back all
the entries from the split-index into a new shared index file
in
This will make us use the split-index feature or not depending
on the value of the "core.splitIndex" config variable.
Signed-off-by: Christian Couder
---
read-cache.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/read-cache.c b/read-cache.c
index f92a912dcb..732b7fe611 1
This way a share index file will not be garbage collected if
we still read from an index it is based from.
As we need to read the current index before creating a new
one, the tests have to be adjusted, so that we don't expect
an old shared index file to be deleted right away when we
create a new o
Signed-off-by: Christian Couder
---
Documentation/config.txt | 13 +
1 file changed, 13 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 221c5982c0..e0f5a77980 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2773,6 +2773,19
When a split-index file is created, let's update the mtime of the
shared index file that the split-index file is referencing.
In a following commit we will make shared index file expire
depending on their mtime, so updating the mtime makes sure that
the shared index file will not be deleted soon.
Signed-off-by: Christian Couder
---
Documentation/config.txt | 6 +++---
Documentation/git-update-index.txt | 37 +
2 files changed, 32 insertions(+), 11 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 24e771d22e.
Signed-off-by: Christian Couder
---
t/t1700-split-index.sh | 44
1 file changed, 44 insertions(+)
diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
index f03addf654..f448fc13cd 100755
--- a/t/t1700-split-index.sh
+++ b/t/t1700-split-index.s
Signed-off-by: Christian Couder
---
config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index 83fdecb1bc..2eaf8ad77a 100644
--- a/config.c
+++ b/config.c
@@ -1701,8 +1701,8 @@ int git_config_get_untracked_cache(void)
if (!strcasecmp
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 work to libify `git apply`
that has
This new function will be used in a following commit to know
if we want to use the split index feature or not.
Signed-off-by: Christian Couder
---
cache.h | 1 +
config.c | 10 ++
2 files changed, 11 insertions(+)
diff --git a/cache.h b/cache.h
index a50a61a197..c126fe475e 100644
---
On Mon, Dec 19, 2016 at 12:58 PM, Duy Nguyen wrote:
> On Sat, Dec 17, 2016 at 03:55:42PM +0100, Christian Couder wrote:
>> +static int clean_shared_index_files(const char *current_hex)
>> +{
>> + struct dirent *de;
>> + DIR *dir = opendir(get_git_dir());
>> +
>> + if (!dir)
>> +
On Mon, Dec 19, 2016 at 12:48 PM, Duy Nguyen wrote:
> On Sat, Dec 17, 2016 at 03:55:36PM +0100, Christian Couder wrote:
>> +static const int default_max_percent_split_change = 20;
>> +
>> +static int too_many_not_shared_entries(struct index_state *istate)
>> +{
>> + int i, not_shared = 0;
>> +
On Mon, Dec 19, 2016 at 12:18 PM, Duy Nguyen wrote:
> On Sat, Dec 17, 2016 at 03:55:30PM +0100, Christian Couder wrote:
>> +static void tweak_split_index(struct index_state *istate)
>> +{
>> + switch (git_config_get_split_index()) {
>> + case -1: /* unset: do nothing */
>> + br
On Mon, Dec 19, 2016 at 12:14 PM, Duy Nguyen wrote:
> On Sat, Dec 17, 2016 at 03:55:28PM +0100, Christian Couder wrote:
>> diff --git a/config.c b/config.c
>> index 2eaf8ad77a..c1343bbb3e 100644
>> --- a/config.c
>> +++ b/config.c
>> @@ -1709,6 +1709,16 @@ int git_config_get_untracked_cache(void)
35 matches
Mail list logo