Migrate callers of real_path() who duplicate the retern value to use
real_pathdup or strbuf_realpath.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/init-db.c | 6 +++---
environment.c | 2 +-
setup.c | 15 +--
sha1_file.c | 2 +-
submo
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams <bmw...@google.com> wrote:
> > A few small changes to improve readability. This is done by grouping
> > related
> > assignments, adding blank lines, ensuring lines are <80 chara
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams <bmw...@google.com> wrote:
> > Convert the 'internal_copy_pathspec()' function to use the pathspec
> > struct interface from using the deprecated 'get_pathspec()' interface.
> >
> >
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams <bmw...@google.com> wrote:
> > Convert 'create_simplify()' to use the pathspec struct interface from
> > using the '_raw' entry in the pathspec.
>
> It would be even better to kill thi
On 12/09, Johannes Sixt wrote:
> Am 09.12.2016 um 00:58 schrieb Brandon Williams:
> >The current implementation of real_path uses chdir() in order to resolve
> >symlinks. Unfortunately this isn't thread-safe as chdir() affects a
> >process as a whole and not just an indivi
On 12/09, Duy Nguyen wrote:
> On Fri, Dec 9, 2016 at 6:58 AM, Brandon Williams <bmw...@google.com> wrote:
> > diff --git a/setup.c b/setup.c
> > index fe572b8..0d9fdd0 100644
> > --- a/setup.c
> > +++ b/setup.c
> > @@ -254,10 +254,12 @@ int get_common_dir_n
On 12/09, Stefan Beller wrote:
> On Fri, Dec 9, 2016 at 11:18 AM, Brandon Williams <bmw...@google.com> wrote:
> > Factor out the logic responsible for stripping the trailing slash on
> > pathspecs referencing submodules into its own functi
f(buf, sizeof(buf), "%s %s\n",
> - sha1_to_hex(oldsha1), sha1_to_hex(newsha1));
> + buf = xstrfmt("%s %s\n", sha1_to_hex(oldsha1), sha1_to_hex(newsha1));
> sigchain_push(SIGPIPE, SIG_IGN);
> - write_in_full(proc.in, buf, n);
> + write_in_full(proc.in, buf, strlen(buf));
> close(proc.in);
> + free(buf);
> sigchain_pop(SIGPIPE);
> return finish_command();
> }
> --
> 2.11.0.154.g5f5f154
>
--
Brandon Williams
Improve constness of the index_state parameter to the
'read_blob_data_from_index' function.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
cache.h | 2 +-
read-cache.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cache.h b/cache.h
index a50
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(-)
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 +++
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 | 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
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.
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
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
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
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
by Junio to address a couple of naming
changes and to redistribute some code between patches so those patches would
need a closer look.
Thanks again to all the work Junio and Stefan put into this before I got a hold
of it.
Any comments are appreciated!
Thanks,
Brandon Williams
Brandon Williams (8
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
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 +++-
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
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(-)
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
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.
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
-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 +
the
dictionary of interned attributes.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c| 171 ++
attr.h| 2 +
common-main.c | 3 ++
3 files changed, 131 insertions(+), 45 deletions(-)
diff --git a/attr.c b/
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(
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.
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 633a12cc3..90f576044 100644
--- a/attr.c
-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 cbb07d25d..f5cc68b67 100644
--- a/attr.c
+++ b/attr.c
@@ -521,26 +521,30 @@
the info stack frame it needs to be its own
isolated frame and can simply be processed first to have the same affect
of being at the top of the stack.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
attr.c | 375 +
1 file chang
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 | 38 -
m able to see the failures. The interesting
thing is that the entry missing is always from the non-submodule file.
--
Brandon Williams
mum curl version there; there's a ton of #ifdef cruft going
> back to 2002-era versions of libcurl).
We should switch to warning all the time since this series adds in
default whitelisted/blacklisted protocols anyways.
--
Brandon Williams
On 11/30, Jeff King wrote:
> On Wed, Nov 30, 2016 at 05:28:28PM -0800, Brandon Williams wrote:
>
> > v6 fixes a race condition which existed in the 'is_submodule_populated'
> > function. Instead of calling 'resolve_gitdir' to check for the existance
> > of a
> >
On 12/01, Jeff King wrote:
> On Thu, Dec 01, 2016 at 11:35:24AM -0800, Brandon Williams wrote:
>
> > > I wouldn't expect anyone to ever set GIT_PROTOCOL_FROM_USER=1, but it
> > > does behave in a funny way here, overriding the "redirect" flag. I think
&
The test_proto function assigns the positional parameters to named
variables, but then still refers to "$desc" as "$1". Using $desc is
more readable and less error-prone.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
t/lib-proto-disable.sh | 12 +
t;p...@peff.net>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/config.txt | 46 ++
Documentation/git.txt| 38 +---
git-submodule.sh | 12 ++--
t/lib-proto-disable.sh | 130 ++
be provided which falls back to reading `GIT_PROTOCOL_FROM_USER`
to determine if the protocol came from the user.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
http.c | 8
transport.c | 8 +---
transport.h | 13 ++---
3 files changed, 19 insertions(+), 10 del
Now that there are default "known-good" and "known-bad" protocols which
are allowed/disallowed by 'is_transport_allowed' we should always warn
the user that older versions of libcurl can't respect the allowed
protocols for redirects.
Signed-off-by: Brandon Williams <bmw...@
The test_proto function assigns the positional parameters to named
variables, but then still refers to "$desc" as "$1". Using $desc is
more readable and less error-prone.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
t/lib-proto-disable.sh | 12 +
Changed the last patch in the series to use the parameter 'from_user' instead
of 'redirect'. This allows us to use the same logic polarity and maintain use
of the same vocabulary.
Brandon Williams (4):
lib-proto-disable: variable name fix
transport: add protocol policy config option
http
On 12/01, Brandon Williams wrote:
> Add a the 'redirect' parameter to 'is_transport_allowed' which allows
> callers to query if a transport protocol can be used on a redirect.
>
> Signed-off-by: Brandon Williams <bmw...@google.com>
> ---
> http.c | 8 +++
is pretty clear. Nobody would ever pass "1" as from_user to the
> function, but it does the sensible thing if they do.
>
> -Peff
>
> [1] The original I posted calling it "redirect" was totally bogus
> because the logic between the two names is inverted.
--
Brandon Williams
planned out, and it obviously is inconsistent with
> the other repo-discovery cases. But it is a convenient side effect for
> submodules, and I doubt anybody is bothered by it in practice.
>
> -Peff
I think this more robust check is probably a good idea, that way we
don't step into a submodule with a .git directory that isn't really a
.git dir.
--
Brandon Williams
Add a the 'redirect' parameter to 'is_transport_allowed' which allows
callers to query if a transport protocol can be used on a redirect.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
http.c | 8
transport.c | 6 +++---
transport.h | 7 ---
3 files chang
On 12/01, Jeff King wrote:
> On Thu, Dec 01, 2016 at 10:14:15AM -0800, Brandon Williams wrote:
>
> > > 1. The new policy config lets you say "only allow this protocol when
> > > the user specifies it". But when http.c calls is_transport_allowed(),
> &g
Now that there are default "known-good" and "known-bad" protocols which
are allowed/disallowed by 'is_transport_allowed' we should always warn
the user that older versions of libcurl can't respect the allowed
protocols for redirects.
Signed-off-by: Brandon Williams <bmw...@
Add a the 'redirect' parameter to 'is_transport_allowed' which allows
callers to query if a transport protocol can be used on a redirect.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
http.c | 8
transport.c | 6 +++---
transport.h | 7 ---
3 files chang
t;p...@peff.net>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/config.txt | 46 ++
Documentation/git.txt| 38 +---
git-submodule.sh | 12 ++--
t/lib-proto-disable.sh | 130 ++
v6 introduces 2 additional patches which address problems with protocols that
libcurl is allowed to use for redirection.
Brandon Williams (4):
lib-proto-disable: variable name fix
transport: add protocol policy config option
http: always warn if libcurl version is too old
transport: check
On 12/01, Brandon Williams wrote:
> On 12/01, Jeff King wrote:
> > On Thu, Dec 01, 2016 at 10:46:23AM -0800, Junio C Hamano wrote:
> >
> > > > mkpath() is generally an unsafe function because it uses a static
> > > > buffer, but it's handy and s
ll leak the
> > existence of those sha1s to her.
> --^^^
> ... to _him_ ? (again Mallory)
>
> ATB,
> Ramsay Jones
Depends, I only know Mallorys who are women so her seems appropriate.
--
Brandon Williams
On 12/01, Jeff King wrote:
> On Thu, Dec 01, 2016 at 12:25:59PM -0800, Brandon Williams wrote:
>
> > Add the from_user parameter to the 'is_transport_allowed' function.
> > This allows callers to query if a transport protocol is allowed, given
> > that the caller knows tha
d to be passed to curl? Is that
because curl only understands those particular protocols?
--
Brandon Williams
Now that there are default "known-good" and "known-bad" protocols which
are allowed/disallowed by 'is_transport_allowed' we should always warn
the user that older versions of libcurl can't respect the allowed
protocols for redirects.
Signed-off-by: Brandon Williams <bmw...@
which falls back to reading `GIT_PROTOCOL_FROM_USER`
to determine if the protocol came from the user.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
http.c | 12 ++--
transport.c | 8 +---
transport.h | 13 ++---
3 files changed, 21 insertions(+), 12 del
v8 of this series moves the creation of an allowed protocol whitelist for
CURLOPT_REDIR_PROTOCOLS to a helper function. This is to help out another
series which depends on the creation of a whitelist for CURLOPT_PROTOCOLS.
Brandon Williams (5):
lib-proto-disable: variable name fix
transport
t;p...@peff.net>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/config.txt | 46 ++
Documentation/git.txt| 38 +---
git-submodule.sh | 12 ++--
t/lib-proto-disable.sh | 130 ++
Move the creation of an allowed protocols whitelist to a helper
function.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
http.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/http.c b/http.c
index fee128b..a1c3a0e 100644
--- a/
The test_proto function assigns the positional parameters to named
variables, but then still refers to "$desc" as "$1". Using $desc is
more readable and less error-prone.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
t/lib-proto-disable.sh | 12 +
On 12/01, Brandon Williams wrote:
> On 12/01, Jeff King wrote:
> > On Thu, Dec 01, 2016 at 12:25:59PM -0800, Brandon Williams wrote:
> >
> > > Add the from_user parameter to the 'is_transport_allowed' function.
> > > This allows callers to query if a tra
On 12/01, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > I started taking a look at your http redirect series (I really should
> > have taking a look at it sooner) and I see exactly what you're talking
> > about. We can easily move this
On 12/01, Johannes Sixt wrote:
> Am 01.12.2016 um 02:28 schrieb Brandon Williams:
> >+git init "su:b" &&
>
> Don't do that. Colons in file names won't work on Windows.
>
> -- Hannes
>
This test is needed to see if the code still works with file
the very least, it handles arbitrary-sized paths via
> strbufs).
I've actually been working on updating our implementation of realpath
today. Its slow going but we'll see if it works when i'm done :)
Also we can just drop in realpath since it requires that all path
components are valid, while ours allows for the final component to be
invalid.
--
Brandon Williams
real_path reentrant.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
abspath.c | 183 +-
1 file changed, 122 insertions(+), 61 deletions(-)
diff --git a/abspath.c b/abspath.c
index 2825de8..6f546e0 100644
--- a/abspath.c
threads:
https://public-inbox.org/git/20161129010538.ga121...@google.com/
https://public-inbox.org/git/1480555714-186183-1-git-send-email-bmw...@google.com/
Brandon Williams (1):
real_path: make real_path thread-safe
abspath.c | 183
> The long tail (i.e. the actual functionality) should actually be
> faster, I'd imagine
> as we do less than with using chdir.
Depends on how expensive the chdir calls were. And I'm working to get
rid of the static buffer. Just need have the callers own the memory
first.
--
Brandon Williams
ively the 'next' buffer can be reused...I decided against that
initially due to readability. And yes, lots of string manipulation
requires lots of strbufs :)
> > + //strbuf_release();
>
> This is why the cover letter toned down expectations ?
> (no // as comment, maybe remove that line?)
yep. It will be added back in though once the callers to real_path take
ownership of the memory.
--
Brandon Williams
On 12/02, Stefan Beller wrote:
>
> test_expect_success '"checkout " honors diff.ignoreSubmodules' '
> @@ -63,6 +70,260 @@ test_expect_success '"checkout " honors
> submodule.*.ignore from .git/
> ! test -s actual
> '
Should you use test_must_fail and not '!'?
--
Brandon Williams
On 12/05, Stefan Beller wrote:
> On Mon, Dec 5, 2016 at 11:25 AM, Brandon Williams <bmw...@google.com> wrote:
> > On 12/02, Stefan Beller wrote:
> >>
> >> test_expect_success '"checkout " honors diff.ignoreSubmodules'
> >> '
> >>
&&
> + git checkout advanced-base &&
> + git diff-files --quiet &&
> + git diff-index --quiet --cached advanced-base &&
> + git checkout --recurse-submodules base
> +'
> +
This test doesn't look like it looks into the submodule to see if the
submodule has indeed changed. Unless diff-index and diff-files recurse
into the submodules?
--
Brandon Williams
On 12/05, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > I just took Jeff's series and applied it on top of mine (and fixed the
> > small problem causing t5812 to fail) and then rebased it to v2.9.0.
> > There were a few issues that nee
On 12/05, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > On 12/01, Junio C Hamano wrote:
> >> Brandon Williams <bmw...@google.com> writes:
> >>
> >> > I started taking a look at your http redirect series (I reall
On 12/05, Stefan Beller wrote:
> On Mon, Dec 5, 2016 at 11:29 AM, Brandon Williams <bmw...@google.com> wrote:
> > On 12/02, Stefan Beller wrote:
> >> +test_expect_success 'option checkout.recurseSubmodules updates submodule'
> >> '
> >> +
On 11/30, Brandon Williams wrote:
> On 11/29, Jeff King wrote:
> > On Tue, Nov 29, 2016 at 01:37:59AM -0500, Jeff King wrote:
> >
> > > 2. Grep threads doing more complicated stuff that needs to take a
> > > lock. You might try building with -fsanitize=thr
teach submodules to load a '.gitmodules' file from a commit sha1. This
enables the population of the submodule_cache to be based on the state
of the '.gitmodules' file from a particular commit.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
cache.h| 2 ++
co
`git grep -e. -l --recurse-submodules HEAD`
from:
HEAD:file
:sub/file
to:
HEAD:file
HEAD:sub/file
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/git-grep.txt | 13 -
builtin/grep.c | 76 ---
t/t781
-by: Brandon Williams <bmw...@google.com>
---
Documentation/git-grep.txt | 5 +
builtin/grep.c | 300 ++---
git.c | 2 +-
t/t7814-grep-recurse-submodules.sh | 99
4 files changed, 386 inse
a submodule's gitdir, rather
than from a working directory.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/grep.c | 20 +--
t/t7814-grep-recurse-submodules.sh | 41 ++
2 files changed, 59 insertions(+), 2 del
Add two helper functions to submodules.c.
`is_submodule_initialized()` checks if a submodule has been initialized
at a given path and `is_submodule_populated()` check if a submodule
has been checked out at a given path.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
submodule.
in
memory.
Thanks to Stefan and Jeff for help debugging this problem.
Brandon Williams (6):
submodules: add helper functions to determine presence of submodules
submodules: load gitmodules file from commit sha1
grep: add submodules as a grep source type
grep: optionally recurse
of the submodule to be grep'd). If the
identifier is a SHA1 then we want to fall through to the
`GREP_SOURCE_SHA1` case to handle the copying of the SHA1.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
grep.c | 16 +++-
grep.h | 1 +
2 files changed, 16 insertions(+), 1 de
On 11/30, Jeff King wrote:
> On Wed, Nov 30, 2016 at 06:32:04PM -0500, Jeff King wrote:
>
> > On Wed, Nov 30, 2016 at 03:28:23PM -0800, Brandon Williams wrote:
> >
> > > So I couldn't find a race condition in the code. I tracked the problem
> > > to grep_so
ble manually. I think the chdir was
> in the main thread.
>
> -Peff
Yeah maybe we're missing something else...
How did you run strace with your stress script?
--
Brandon Williams
be an error with the
submodule's .git file/directory then the child process will fail out.
--
Brandon Williams
On 11/30, Jeff King wrote:
> On Wed, Nov 30, 2016 at 03:42:48PM -0800, Brandon Williams wrote:
>
> > > where 20813 and 20867 are two threads of the main process. One is doing
> > > the lstat and the other calls chdir at the same moment.
> >
> > Yeah so it l
ader/writer type of lock where many
> "reader" threads can take the "I need to lstat()" lock simultaneously,
> but block when an "I'm going to chdir()" writer holds it.
>
> -Peff
Oh interesting, I wonder if there is a way to not have to perform a
chdir since taking a lock to lstat wouldn't be ideal.
Thanks for helping out with this!
--
Brandon Williams
On 12/01, Jeff King wrote:
> On Thu, Dec 01, 2016 at 03:26:56PM -0800, Brandon Williams wrote:
>
> > > I started taking a look at your http redirect series (I really should
> > > have taking a look at it sooner) and I see exactly what you're talking
> > > abou
path() couldn't be
re-implemented to avoid using chdir? I tried looking into the history of
the function but couldn't find anything explaining why it was done that
way. I assume it has to do with symlinks, but I thought there was a
syscall (readlink?) that could do the resolution.
--
Brandon Williams
On 12/02, Jacob Keller wrote:
> On Fri, Dec 2, 2016 at 10:36 AM, Brandon Williams <bmw...@google.com> wrote:
> > On 12/01, Jeff King wrote:
> >> On Thu, Dec 01, 2016 at 01:56:32PM -0800, Stefan Beller wrote:
> >>
> >> > > Bleh. Loo
tion realpath() can't be used?
> >>> From a cursory look at its man page it seems to do the symlink
> >>> resolution.
> >>>
> >>> --
> >>> Brandon Williams
> >>
> >> I believe it uses the same method and thus wouldn't
On 01/03, Duy Nguyen wrote:
> On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams <bmw...@google.com> wrote:
> > @@ -340,8 +336,9 @@ static void NORETURN unsupported_magic(const char
> > *pattern,
> > continue;
>
On 01/03, Duy Nguyen wrote:
> On Thu, Dec 29, 2016 at 5:06 PM, Duy Nguyen <pclo...@gmail.com> wrote:
> > On Thu, Dec 29, 2016 at 1:18 AM, Brandon Williams <bmw...@google.com> wrote:
> >> On 12/27, Junio C Hamano wrote:
> >>> * bw/pathspec-cleanup (2016-1
Create helper functions to read the global magic environment variables
in additon to factoring out the global magic gathering logic into its
own function.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
pathspec.c | 127 +-
401 - 500 of 2388 matches
Mail list logo