Looks good to me! Thanks for writing the documentation. I really
need to be better about getting documentation done at the same time
I'm adding features :)
-Brandon
On Wed, Feb 1, 2017 at 3:16 PM, Junio C Hamano wrote:
>
> cornelius.w...@tngtech.com writes:
>
> > From:
pend on prefix
having a \0 at prefix_len then this will allow us to more easily find
the bug and fix it.
>
> >
> > /* Read the directory and prune it */
> > read_directory(dir, prefix, prefix_len, pathspec);
> >
> > - free(prefix);
> > return prefix_len;
> > }
> --
> Duy
--
Brandon Williams
: '!')
And the user may scratch their head for a second since they didn't
supply the '!' character, but rather '^'. That being said I think it
should be fine since the long name of the magic is also printed so the
user should be able to figure out what's wrong. I also don't think
there are any users of pathspecs which disallow exclude magic so this
may not even be an issue.
--
Brandon Williams
On 01/23, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > The last big hurdle towards a thread-safe API for the attribute system
> > is the reliance on a global attribute stack that is modified during each
> > call into the attribute syste
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/attr.c
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
gọc Duy <pclo...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/gitattributes.txt | 8 +---
attr.c | 15 +++
From: Stefan Beller <sbel...@google.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/gitattributes.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/gitattributes.t
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 40 +++-
1 file changed, 39 i
n
NULL after cleaning up.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/attr.c
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
as well as eliminates the
potential for memory to grow unbounded. This is also more inline with the
original vision of the attribute system refactor.
Brandon Williams (8):
attr: pass struct attr_check to collect_some_attrs
attr: use hashmap for attribute dictionary
attr: eliminate global
alves the number of times we mention
the attr_stack global variable.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 71 +++-
xactly spell out what the
rules for a good attribute name are, etc.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 34 --
1 fil
tructure, in
which these N elements are held, rename the type used for these
individual array elements to "struct attr_check_item" and rename
the function to "git_check_attrs()".
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.
the
dictionary of interned attributes.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c| 173 +++---
attr.h| 2 +
common-main.c | 3 +
3 files changed, 133 insertions(+), 45 deletions(-)
diff --git a/attr.c b/attr.c
time prior to attribute collection instead of each time a macro
needs to be expanded.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 69 ++
attr.h | 6 ++
2 files changed, 37 insertions(+), 38 deletions(-)
hen call attr_check_append() to add attribute names
one by one.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 38 -
in the attribute collection
process. This brings the attribute system one step closer to being
thread-safe.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 114 +++--
attr.h | 2 ++
2 files changed, 78 insertions(
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 14 +++---
attr.h | 2 +-
builtin/check-attr.c | 3 ++-
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/attr.c b/attr.c
index ed9ba3756..95456503e 100644
--- a/attr.c
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
commit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --g
o terminate" with a direct return
from there.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
the structure.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/attr.c b/attr.c
index 04d24334e
-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 49 -
attr.h | 3 ++-
2 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/attr.c b/attr.c
index c2ea5cb29..f35c1107f 100644
--- a/attr.c
+++ b/attr.c
@@ -578,26 +578,30 @@
Push the bare repository check into the 'read_attr()' function. This
avoids needing to have extra logic which creates an empty stack frame
when inside a bare repo as a similar bit of logic already exists in the
'read_attr()' function.
Signed-off-by: Brandon Williams <bmw...@google.
instances. Due to the direction mechanism the stack
needs to be dropped when the direction is switched. In order to ensure
correctness when the direction is changed the attribute system needs to
iterate through all active attr_check instances and drop each of their
stacks.
Signed-off-by: Brandon
The old callchain used to take an array of attr_check_item items.
Instead pass the 'attr_check' container object to 'collect_some_attrs()'
and access the fields in the data structure directly.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.
>
> Bugfixes and cleanups (the first one is actually a recent-ish
> regression).
Which is most likely my fault, Sorry! :)
I think the old behavior was to die and not return NULL.
--
Brandon Williams
On 01/23, Brandon Williams wrote:
> As we discussed off-line I'll also do the rework to break up the
> question and result. That way two threads can be executing using the
> same attr_check structure.
Thinking about this I don't really see what we would gain by breaking
them up.
Right
From: Junio C Hamano <gits...@pobox.com>
Since nobody uses the old API, make it file-scope static, and update
the documentation to describe the new API.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Bra
-terminated list of attribute names and initialize this
structure.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 74 +
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
ct attr_check" struct with data
that can be used in optimizing the query for the specific N
attributes it contains.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@goo
com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 2 +-
attr.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/attr.c b/attr.c
index e42f931b3..f7cf7ae30 100644
--- a/attr.c
+++ b/attr.c
@@ -43,7 +43,7 @@ static int cannot_trust_maybe_real;
stat
t; + test -f sub1/nested/.git &&
> + test -d .git/modules/sub1/modules/nested &&
> + git status >actual.1 &&
> + git -C sub1/nested rev-parse HEAD >actual.2 &&
> + test_cmp expect.1 actual.1 &&
> + test_cmp expect.2 actual.2
> +'
> +
> test_expect_success 'setup a gitlink with missing .gitmodules entry' '
> git init sub2 &&
> test_commit -C sub2 first &&
> --
> 2.11.0.486.g67830dbe1c
Aside from my one question the rest of this looks good to me.
--
Brandon Williams
have submodules and worktrees working nicely together, but for now
> just produce 'correct' (i.e. direct) pointers.
>
> Signed-off-by: Stefan Beller <sbel...@google.com>
Looks good to me!
--
Brandon Williams
b/contrib/coccinelle/xstrdup_or_null.cocci
> index 3fceef132b..8e05d1ca4b 100644
> --- a/contrib/coccinelle/xstrdup_or_null.cocci
> +++ b/contrib/coccinelle/xstrdup_or_null.cocci
> @@ -5,3 +5,9 @@ expression V;
> - if (E)
> -V = xstrdup(E);
> + V = xstrdup_or_null(E);
> +
> +@@
> +expression E;
> +@@
> +- xstrdup(absolute_path(E))
> ++ absolute_pathdup(E)
> --
> 2.11.0
>
These two patches look good to me.
--
Brandon Williams
hen call attr_check_append() to add attribute names
one by one.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
This is the correct 16/27 patch that doesn't have the
-terminated list of attribute names and initialize this
structure.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
This is the correct 15/27 patch that doesn't have the r
ves you a bit more information to work with. Since
Stefan has been working with this more recently than me he may have some
more input.
--
Brandon Williams
sy, but I was wondering how
> long it usually takes to get a response to patches? (also whether I'd
> gotten some part of the submission process wrong?)
>
> Thanks,
> Peter
It looks like this must have just fallen through the cracks. Your patch
looks good to me and works when I test it locally.
--
Brandon Williams
o. By
disallow I mean place a comment at the definition to the macro and
hopefully catch something like that in code-review. We have the same
issue with the `ALLOC_GROW()` macro.
--
Brandon Williams
de to call into the attribute system.
Most of the changes in this revision are cosmetic (variable renames, code
movement, etc) but there was a memory leak that was also fixed.
Brandon Williams (8):
attr: pass struct attr_check to collect_some_attrs
attr: use hashmap for attribute diction
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
commit.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --g
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
n
NULL after cleaning up.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/attr.c
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 40 +++-
1 file changed, 39 i
Push the bare repository check into the 'read_attr()' function. This
avoids needing to have extra logic which creates an empty stack frame
when inside a bare repo as a similar bit of logic already exists in the
'read_attr()' function.
Signed-off-by: Brandon Williams <bmw...@google.
alves the number of times we mention
the attr_stack global variable.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 71 +++-
tructure, in
which these N elements are held, rename the type used for these
individual array elements to "struct attr_check_item" and rename
the function to "git_check_attrs()".
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.
time prior to attribute collection instead of each time a macro
needs to be expanded.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 75 +-
1 file changed, 37 insertions(+), 38 deletions(-)
diff --git a/at
the
dictionary of interned attributes.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c| 173 +++---
attr.h| 2 +
common-main.c | 3 +
3 files changed, 133 insertions(+), 45 deletions(-)
diff --git a/attr.c b/attr.c
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 12 ++--
attr.h | 2 +-
builtin/check-attr.c | 3 ++-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/attr.c b/attr.c
index 8f4402ef3..69643ae77 100644
--- a/attr.c
+++ b/
-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 49 -
attr.h | 3 ++-
2 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/attr.c b/attr.c
index 62298ec2f..5493bff22 100644
--- a/attr.c
+++ b/attr.c
@@ -677,26 +677,30 @@
From: Junio C Hamano <gits...@pobox.com>
Since nobody uses the old API, make it file-scope static, and update
the documentation to describe the new API.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Bra
xactly spell out what the
rules for a good attribute name are, etc.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 34 --
1 fil
hen call attr_check_append() to add attribute names
one by one.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 168 +++
in the attribute collection
process. This brings the attribute system one step closer to being
thread-safe.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 121 -
attr.h | 5 +++
2 files changed, 87 insertions(
ct attr_check" struct with data
that can be used in optimizing the query for the specific N
attributes it contains.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@goo
From: Stefan Beller <sbel...@google.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/gitattributes.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/gitattributes.t
The old callchain used to take an array of attr_check_item items.
Instead pass the 'attr_check' container object to 'collect_some_attrs()'
and access the fields in the data structure directly.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.
instances. Due to the direction mechanism the stack
needs to be dropped when the direction is switched. In order to ensure
correctness when the direction is changed the attribute system needs to
iterate through all active attr_check instances and drop each of their
stacks.
Signed-off-by: Brandon
-terminated list of attribute names and initialize this
structure.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 74 +
gọc Duy <pclo...@gmail.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/gitattributes.txt | 8 +---
attr.c | 15 +++
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 2 +-
attr.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/attr.c b/attr.c
index e42f931b3..f7cf7ae30 100644
--- a/attr.c
+++ b/attr.c
@@ -43,7 +43,7 @@ static int cannot_trust_maybe_real;
stat
From: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/attr.c
the structure.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/attr.c b/attr.c
index 04d24334e
o terminate" with a direct return
from there.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
Signed-off-by: Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
On 01/25, Brandon Williams wrote:
> On 01/25, Junio C Hamano wrote:
> > Brandon Williams <bmw...@google.com> writes:
> >
> > >> In my mind, the value of having a constant check_attr is primarily
> > >> that it gives us a stable pointer to serve
On 01/25, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> >> In my mind, the value of having a constant check_attr is primarily
> >> that it gives us a stable pointer to serve as a hashmap key,
> >> i.e. the identifier for each call
per &&
>rm -rf submodule &&
>git submodule update submodule &&
> @@ -505,6 +519,7 @@ test_expect_success 'submodule update --merge - ignores
> --merge for new submod
> '
>
> test_expect_success 'submodule update --rebase - ignores --rebase for new
> submodules' '
> + test_config -C super submodule.submodule.update checkout &&
> (cd super &&
>rm -rf submodule &&
>git submodule update submodule &&
> --
> 2.11.0.495.g04f60290a0.dirty
>
--
Brandon Williams
utputs valid :
> > for HEAD:t/' '
> > test_cmp expected actual
> > '
> >
> > +test_expect_success 'grep outputs valid : for HEAD:t' '
> > + git grep vvv HEAD:t >actual &&
> > + test_cmp expected actual
> > +'
> > +
>
> Perhaps you want an annotated tag object refs/tags/v1.0 that points
> at the commit at the HEAD, and then run the same grep on v1.0:t, in
> addition to the above test.
>
> > cat >expected < > HEAD:t/a/v:vvv
> > HEAD:t/v:vvv
--
Brandon Williams
On 01/23, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > ... It seems like breaking the question and answer up
> > doesn't buy you much in terms of reducing allocation churn and instead
> > complicates the API with needing to keep t
On 01/24, Stefan Beller wrote:
> On Tue, Jan 24, 2017 at 1:58 PM, Brandon Williams <bmw...@google.com> wrote:
> > On 01/24, Stefan Beller wrote:
> >> + if (read_gitfile_gently(old_git_dir, _code) ||
> >> + err_co
one
> +'
> +
> +test_expect_success 'absorb the git dir in a nested submodule' '
> + git status >expect.1 &&
> + git -C sub1/nested rev-parse HEAD >expect.2 &&
> + git submodule absorbgitdirs &&
> + test -f sub1/.git &&
>
On 01/28, Stefan Beller wrote:
>
> This being moved down to below (being review churn) sounds like a
> rebase mistake. ;)
>
Yep, thanks for catching that. I'll need to fix that up.
--
Brandon Williams
quot;could not run 'git status in submodule '%s'"),
> + die(_("could not run 'git status' in submodule '%s'"),
> path);
> ret = -1;
> }
> --
> 2.11.1
>
--
Brandon Williams
with the pathspec.
Based on a patch by Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/git-clone.txt | 23 ++-
builtin/clone.c | 36 +--
t/t7400-submodule-ba
by
git submodule update --init --init-active
This new switch allows users to record more complex patterns as it saves
retyping them whenever you invoke update.
Based on a patch by Stefan Beller <sbel...@google.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Docum
Use the 'is_submodule_initialized()' helper to check for configured
submodules instead of manually checking for the submodule's URL in the
config.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c | 11 +++
1 file changed, 3 insertions(+), 8 del
fies which submodules should exist in the
working tree.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
submodule.c | 25 ++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/submodule.c b/submodule.c
index 4c4f033e8..991066ddf 100644
--- a/s
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 02b85dceb..f35345775 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1127,7 +1127,7 @@ cm
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 4633a4336..f8adfb179 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1026,14 +1026,13 @@ cmd_
When submodule.active is configured, in addition to adding
submodule."".url to the config, add the path of the added
submodule if it isn't already covered by the current config values.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 1
is active or not.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c| 11
t/t7413-submodule-is-active.sh | 63 ++
2 files changed, 74 insertions(+)
create mode 100755 t/t7413-submodule-is-active.sh
diff --git a/b
submodule.active with a pathspec to use to check if a submodule is
initialized.
Brandon Williams (10):
submodule: decouple url and submodule existence
submodule update: add `--init-active` switch
clone: add --submodule-spec= switch
completion: clone can initialize specific submodules
submodule--helper
Signed-off-by: Brandon Williams <bmw...@google.com>
---
contrib/completion/git-completion.bash | 1 +
1 file changed, 1 insertion(+)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 6721ff80f..4e473aa90 100644
--- a/contrib/completi
The user could have configured the submodule to have a different URL
from the one in the superproject's config. To account for this read
what the submodule has configured for remote.origin.url and use that
instead.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.
Since the child process luanched
for the submodule has some context that it is operating underneath a
superproject, this error could be avoided.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
t/t3007-ls-files-recurse-submodules.sh | 50 ++
1 fil
Fix a bug which causes a child process for a submodule to error out when
a relative pathspec with a ".." is provided in the superproject.
While at it, correctly construct the super-prefix to be used in a
submodule when not at the root of the repository.
Signed-off-by: Brandon Wil
Fix a bug which causes a child process for a submodule to error out when a
relative pathspec with a ".." is provided in the superproject.
While at it, correctly construct the super-prefix to be used in a submodule
when not at the root of the repository.
Signed-off-by: Brandon Wil
-off-by: Brandon Williams <bmw...@google.com>
---
pathspec.c | 2 +-
pathspec.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/pathspec.c b/pathspec.c
index 7ababb315..ff622ba18 100644
--- a/pathspec.c
+++ b/pathspec.c
@@ -353,7 +353,7 @@ static void init_pathspec_item(
Since the child
process luanched for the submodule has some context that it is operating
underneath a superproject, this error could be avoided.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
t/t7814-grep-recurse-submodules.sh | 42 ++
1 file changed,
d an additional flag for the
parse_pathspec() function in order to treat all paths provided as being from
the root of the repository. I hesitantly selected the name 'PATHSPEC_FROMROOT'
but I'm not fond of it since its too similar to the pathspec magic define
'PATHSPEC_FROMTOP'. So I'm open for naming s
if (get_sha1_with_context(arg, 0, sha1, ))
> + break;
> +
> + object = parse_object_or_die(sha1, arg);
> + if (!seen_dashdash)
> + verify_non_filename(prefix, arg);
> + add_object_array_with_path(object, arg, , oc.mod
> bump it quite a bit lower (to right before we actually start
> grepping), but I doubt it matters much in practice.
Looks good. And yes I don't believe anything needs the thread
initialization to happen earlier.
--
Brandon Williams
ule in the
.gitmodules file, isn't it already initialized then? Maybe this state
would be better named "(in)active" as a module that is interesting to a
user is "active"?
--
Brandon Williams
e + pos,
> + (last - pos) * sizeof(struct cache_entry *));
> + active_nr = last - pos;
> }
>
> /*
> --
> 2.11.1
>
Both these patches look good to me.
--
Brandon Williams
1 - 100 of 2388 matches
Mail list logo