Now that the call to 'parse_pathspec()' doesn't modify the passed in
const char **array there isn't a need to duplicate the pathspec element
prior to freeing the intermediate strings. This small cleanup just
makes the code a bit easier to read.
Signed-off-by: Brandon William
Factor out the logic responsible for parsing long magic into its own
function. As well as hoist the prefix check logic outside of the inner
loop as there isn't anything that needs to be done after matching
"prefix:".
Signed-off-by: Brandon Williams
---
he old functionality
of modifying the const char **argv array that was passed into
parse_pathspec. Instead the constructed 'match' string (which is a
pathspec element with the prefix prepended) is only stored in its
corresponding pathspec_item entry.
Signed-off-by: Brandon Williams
--
Factor out the logic responsible for parsing short magic into its own
function.
Signed-off-by: Brandon Williams
---
pathspec.c | 54 --
1 file changed, 36 insertions(+), 18 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 08e76f6
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
---
pathspec.c | 120 +
1 file changed, 74
Factor out the logic responsible for stripping the trailing slash on
pathspecs referencing submodules into its own function.
Signed-off-by: Brandon Williams
---
pathspec.c | 68 ++
1 file changed, 42 insertions(+), 26 deletions
Factor out the logic responsible for the magic in a pathspec element
into its own function.
Also avoid calling into the parsing functions when
`PATHSPEC_LITERAL_PATH` is specified since it causes magic to be
ignored and all paths to be treated as literals.
Signed-off-by: Brandon Williams
Removed unused variable 'n' from the 'unsupported_magic()' function.
Signed-off-by: Brandon Williams
---
pathspec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 8f367f0..ec0d590 100644
--- a/pathspec.c
+++ b/pathspe
A few small changes to improve readability. This is done by grouping related
assignments, adding blank lines, ensuring lines are <80 characters, etc.
Signed-off-by: Brandon Williams
---
pathspec.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/pathspec.
Remove part of the function header comment to prefix_pathspec as it is
no longer relevant.
Signed-off-by: Brandon Williams
---
pathspec.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 8a07b02..66db257 100644
--- a/pathspec.c
+++ b/pathspec.c
mented could not cause security regressions unless
> you use the new feature (IOW, we still respect the whitelist environment
> exactly as before).
Either way let me know if there is something I need to do.
--
Brandon Williams
On 12/06, Stefan Beller wrote:
> On Tue, Dec 6, 2016 at 1:51 PM, Brandon Williams wrote:
>
> > struct strbuf sb = STRBUF_INIT;
> > - if (prefixlen && !literal_global) {
> > - /* Preserve the actual pr
On 12/06, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > +/* removes the last path component from 'path' except if 'path' is root */
> > +static void strip_last_component(struct strbuf *path)
> > +{
> > + if (path->len > 1) {
&
t; > must be converted into
> > \\SEFVER\SHARE\DIR1
>
> Additional questions that may be interesting are:
>
> //A/B/../Cis it //A/C? is it an error?
> //A/B/../../C/D is it //C/D? is it an error?
>
Also is //.. the same as //? I would assume so since /.. is /
--
Brandon Williams
On 12/07, Johannes Sixt wrote:
> Am 07.12.2016 um 01:10 schrieb Brandon Williams:
> >This function should accept both absolute and relative paths, which
> >means it should probably accept "C:\My Files". I wasn't thinking about
> >windows 100% of the time whi
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > A few small changes to improve readability. This is done by grouping
> > related
> > assignments, adding blank lines, ensuring lines are <80 characters, etc.
> >
>
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > Create helper functions to read the global magic environment variables
> > in additon to factoring out the global magic gathering logic into its
> > own function.
> >
> >
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > @@ -426,8 +423,7 @@ void parse_pathspec(struct pathspec *pathspec,
> > nr_exclude++;
> > if (item[i].magic & magic_mask)
> >
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > @@ -413,10 +411,9 @@ void parse_pathspec(struct pathspec *pathspec,
> > prefixlen = prefix ? strlen(prefix) : 0;
> >
> > for (i = 0; i < n; i++) {
> >
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > Convert 'show_recursive()' to use the pathspec struct interface from
> > using the '_raw' entry in the pathspec struct.
>
> Slightly off-topic (sorry, but you ma
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > Convert 'fill_directory()' to use the pathspec struct interface from
> > using the '_raw' entry in the pathspec struct.
> >
> > Signed-off-by: Brandon Williams
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > A few small changes to improve readability. This is done by grouping
> > related
> > assignments, adding blank lines, ensuring lines are <80 characters, etc.
> >
>
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams 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 this create_si
On 12/07, Duy Nguyen wrote:
> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> > Convert the 'internal_copy_pathspec()' function to use the pathspec
> > struct interface from using the deprecated 'get_pathspec()' interface.
> >
> > In add
n these lines, looks like there is an extra space
before "submodule--helper"
--
Brandon Williams
gt; Yours is cleaner; I don't remember what I was thinking.
>
> Feel free to squash it in; in case a resend is needed I will do that.
Just make sure to leave that free in as it refers to another variable
(submodule_gitdir). It actually turns out there is a memory leak in the
original code because submodule_common_dir is never freed after being
detached from the strbuf.
--
Brandon Williams
On 12/08, Duy Nguyen wrote:
> On Tue, Dec 6, 2016 at 3:16 AM, Brandon Williams wrote:
> > On 12/05, Stefan Beller wrote:
> >> > static const char *real_path_internal(const char *path, int
> >> > die_on_error)
> >> > {
> >> > - sta
On 12/08, Duy Nguyen wrote:
> On Thu, Dec 8, 2016 at 7:36 AM, Brandon Williams wrote:
> >> > @@ -25,25 +26,43 @@ static const char **internal_copy_pathspec(const
> >> > char *prefix,
> >> > {
> >> > int i;
> >> >
On 12/08, Duy Nguyen wrote:
> On Thu, Dec 8, 2016 at 7:03 AM, Brandon Williams wrote:
> > On 12/07, Duy Nguyen wrote:
> >> On Wed, Dec 7, 2016 at 4:51 AM, Brandon Williams wrote:
> >> > Convert 'create_simplify()' to use the pathspec struct interface f
e
freed after getting the result from 'prefix_path()'.
Signed-off-by: Brandon Williams
---
builtin/mv.c | 50 +++---
1 file changed, 31 insertions(+), 19 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 2f43877..4e86dc5 100644
--- a/buil
v2 of this series addresses the comments brought up in v1, most of which were
small cosmetic changes (since this is mostly a cosmetic series to begin with).
Brandon Williams (16):
mv: remove use of deprecated 'get_pathspec()'
dir: convert create_simplify to use the pathspec struct
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
---
pathspec.c | 127 +
1 file changed, 78
Convert 'fill_directory()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec struct.
Signed-off-by: Brandon Williams
---
dir.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dir.c b/dir.c
index 7df292b..a50b6f
more general
situations.
Also, slightly change the logic which decides when to prefix the
original element in order to prevent a pathspec of "." from getting
converted to "" (empty string).
Signed-off-by: Brandon Williams
---
pathspec.c | 33 +--
ct, they need to be freed when clearing the
pathspec struct (in 'clear_pathspec()') and duplicated when copying the
pathspec struct (in 'copy_pathspec()').
Also change the type of 'match' and 'original' to 'char *' in order to
more explicitly show the
Factor out the logic responsible for parsing short magic into its own
function.
Signed-off-by: Brandon Williams
---
pathspec.c | 54 --
1 file changed, 36 insertions(+), 18 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 523d7bf
Convert 'create_simplify()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec.
Signed-off-by: Brandon Williams
---
dir.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/dir.c b/dir.c
index bfa
Factor out the logic responsible for parsing long magic into its own
function. As well as hoist the prefix check logic outside of the inner
loop as there isn't anything that needs to be done after matching
"prefix:".
Signed-off-by: Brandon Williams
---
Give a more relevant name to the prefix_pathspec function as it does
more than just prefix a pathspec element.
Signed-off-by: Brandon Williams
---
pathspec.c | 24 +++-
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 4686298
Factor out the logic responsible for the magic in a pathspec element
into its own function.
Also avoid calling into the parsing functions when
`PATHSPEC_LITERAL_PATH` is specified since it causes magic to be
ignored and all paths to be treated as literals.
Signed-off-by: Brandon Williams
Factor out the logic responsible for stripping the trailing slash on
pathspecs referencing submodules into its own function.
Signed-off-by: Brandon Williams
---
pathspec.c | 68 ++
1 file changed, 42 insertions(+), 26 deletions
A few small changes to improve readability. This is done by grouping related
assignments, adding blank lines, ensuring lines are <80 characters, and
adding additional comments.
Signed-off-by: Brandon Williams
---
pathspec.c | 15 ++-
1 file changed, 10 insertions(+), 5 deleti
Convert 'show_recursive()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec struct.
Signed-off-by: Brandon Williams
---
builtin/ls-tree.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/builtin/ls-tree.c
more easily search the man pages for that magic type.
This also avoids passing an extra parameter around the pathspec
initialization code.
Signed-off-by: Brandon Williams
---
pathspec.c | 23 ---
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/pathspec.c b/paths
he old functionality
of modifying the const char **argv array that was passed into
parse_pathspec. Instead the constructed 'match' string (which is a
pathspec element with the prefix prepended) is only stored in its
corresponding pathspec_item entry.
Signed-off-by: Brandon Williams
--
t using '\' as a
directory separator instead of '/'.
>
> >It seams that we may wnat a function get_start_of_path(uncpath),
> >which returns:
> >
> >get_start_of_path_win("//?/D:/very-long-path") "/very-long-path"
>
> We have offset_1st_component().
Thanks for letting me know this function exists, that makes my job a bit
easier.
--
Brandon Williams
Removed unused variable 'n' from the 'unsupported_magic()' function.
Signed-off-by: Brandon Williams
---
pathspec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 8f367f0..ec0d590 100644
--- a/pathspec.c
+++ b/pathspe
Change the name of real_path_internal to strbuf_realpath. In addition
push the static strbuf up to its callers and instead take as a
parameter a pointer to a strbuf to use for the final result.
This change makes strbuf_realpath reentrant.
Signed-off-by: Brandon Williams
---
abspath.c | 53
aking real_path one step closer to being reentrant.
Signed-off-by: Brandon Williams
---
abspath.c | 183 +-
1 file changed, 122 insertions(+), 61 deletions(-)
diff --git a/abspath.c b/abspath.c
index 2825de8..92f2a29 100644
--- a/absp
callers of real_path_internal
* renamed real_path_internal to strbuf_realpath
* added real_pathdup
* migrated some callers of real_path to real_pathdup and strbuf_realpath
Brandon Williams (4):
real_path: resolve symlinks by hand
real_path: convert real_path_internal to strbuf_realpath
real_path
Create real_pathdup which returns a caller owned string of the resolved
realpath based on the provide path.
Signed-off-by: Brandon Williams
---
abspath.c | 13 +
cache.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/abspath.c b/abspath.c
index b0d4c1b..df37356 100644
Migrate callers of real_path() who duplicate the retern value to use
real_pathdup or strbuf_realpath.
Signed-off-by: Brandon Williams
---
builtin/init-db.c | 6 +++---
environment.c | 2 +-
setup.c | 15 +--
sha1_file.c | 2 +-
submodule.c | 2
On 12/08, Junio C Hamano wrote:
> Will queue, but with fixes on issues spotted by my pre-acceptance
> mechanical filter squashed in, to fix style issues in the
> destination of code movements.
Is this pre-acceptance filter you use something that I could run
locally?
--
Brandon Williams
Factor out the logic responsible for stripping the trailing slash on
pathspecs referencing submodules into its own function.
Change-Id: Icad62647c04b4195309def0e3db416203d14f9e4
Signed-off-by: Brandon Williams
---
pathspec.c | 68 ++
1
On 12/09, Duy Nguyen wrote:
> On Fri, Dec 9, 2016 at 1:19 AM, Brandon Williams wrote:
> > On 12/08, Duy Nguyen wrote:
> >> On Thu, Dec 8, 2016 at 7:03 AM, Brandon Williams wrote:
> >> > On 12/07, Duy Nguyen wrote:
> >> >> On Wed, Dec 7, 2016
On 12/09, Duy Nguyen wrote:
> On Fri, Dec 9, 2016 at 6:58 AM, Brandon Williams 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_noenv(struct st
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 i
On 12/09, Stefan Beller wrote:
> On Fri, Dec 9, 2016 at 11:18 AM, Brandon Williams wrote:
> > Factor out the logic responsible for stripping the trailing slash on
> > pathspecs referencing submodules into its own function.
> >
> > Change-Id: Icad62647c04b4195309def0e3d
ore.repositoryformatversion, or find any unrecognized
> > extensions. But the problem is not specific to this code. And fixing
> > it is no small task. But perhaps we could call a dummy
> > validate_submodule_gitdir() here? Then when we implement that function
> > for real, we don't have to search the entire code base to see where to
> > put it.
> >
> > Kinda off-topic though. Feel free to ignore the above comment.
>
> ok I'll add a TODO/emptyfunction for that.
So is using resolve_gitdir not ok when trying to see if a submodule has
a gitdir at a particular path?
--
Brandon Williams
On 12/09, Stefan Beller wrote:
> On Fri, Dec 9, 2016 at 3:44 PM, Junio C Hamano wrote:
> > Brandon Williams writes:
> >
> >> Factor out the logic responsible for parsing long magic into its own
> >> function. As well as hoist the prefix check logic outside of t
Changes in v3:
* Rewrite of `strip_last_component()` as the v2 verison didn't properly handle
inputs like '/foo'. Thanks to Johannes for pointing this out and suggesting
a solution.
* Small style changes
* Revert the call in `get_common_dir_noenv()` to maintain proper function
Create real_pathdup which returns a caller owned string of the resolved
realpath based on the provide path.
Signed-off-by: Brandon Williams
---
abspath.c | 13 +
cache.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/abspath.c b/abspath.c
index 8c6c76b..79ee310 100644
aking real_path one step closer to being reentrant.
Signed-off-by: Brandon Williams
---
abspath.c | 190 ++
1 file changed, 129 insertions(+), 61 deletions(-)
diff --git a/abspath.c b/abspath.c
index 2825de8..cafcae0 100644
--- a/absp
Migrate callers of real_path() who duplicate the retern value to use
real_pathdup or strbuf_realpath.
Signed-off-by: Brandon Williams
---
builtin/init-db.c | 6 +++---
environment.c | 2 +-
setup.c | 13 -
sha1_file.c | 2 +-
submodule.c | 2
Change the name of real_path_internal to strbuf_realpath. In addition
push the static strbuf up to its callers and instead take as a
parameter a pointer to a strbuf to use for the final result.
This change makes strbuf_realpath reentrant.
Signed-off-by: Brandon Williams
---
abspath.c | 53
ded one test title slightly.
> * interdiff to v7 (that is queued as origin/sb/submodule-embed-gitdir) below.
>
not important but your cover letter's subject is v7 instead of v8 :)
--
Brandon Williams
On 12/12, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > +/* removes the last path component from 'path' except if 'path' is root */
> > +static void strip_last_component(struct strbuf *path)
> > +{
> > + size_t offset = offset_1st_co
On 12/12, Stefan Beller wrote:
> On Mon, Dec 12, 2016 at 3:47 PM, Junio C Hamano wrote:
> > Junio C Hamano writes:
> >
> >> Brandon Williams writes:
> >>
> >>> Migrate callers of real_path() who duplicate the retern value to use
> >>&
a ":" which isn't supported on windows. I have that
change made in my local grep branch but I haven't sent out a reroll of
the series yet due to the underlying race-condition that existed (due to
the way realpath was being calculated). I'll send out a reroll of the
series once the discussion on bw/realpath-wo-chdir has concluded (as
the grep series is now dependent on it).
--
Brandon Williams
On 12/09, Brandon Williams wrote:
> On 12/09, Duy Nguyen wrote:
> > On Fri, Dec 9, 2016 at 1:19 AM, Brandon Williams wrote:
> > > On 12/08, Duy Nguyen wrote:
> > >> On Thu, Dec 8, 2016 at 7:03 AM, Brandon Williams
> > >> wrote:
> > >> >
Teach simplify_away() and exclude_matches_pathspec() to handle struct
pathspec directly, eliminating the need for the struct path_simplify.
Also renamed the len parameter to pathlen in exclude_matches_pathspec()
to match the parameter names used in simplify_away().
Signed-off-by: Brandon
) and exclude_matches_pathspec(). [02/16]
* small style issues corrected from v2. [15/16]
Brandon Williams (16):
mv: remove use of deprecated 'get_pathspec()'
dir: remove struct path_simplify
dir: convert fill_directory to use the pathspec struct interface
ls-tree: convert show_recur
Convert 'fill_directory()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec struct.
Signed-off-by: Brandon Williams
---
dir.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dir.c b/dir.c
index aadf073..15f7c9
Convert 'show_recursive()' to use the pathspec struct interface from
using the '_raw' entry in the pathspec struct.
Signed-off-by: Brandon Williams
---
builtin/ls-tree.c | 16 +++-
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/builtin/ls-tree.c
more easily search the man pages for that magic type.
This also avoids passing an extra parameter around the pathspec
initialization code.
Signed-off-by: Brandon Williams
---
pathspec.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/pathspec.c b/paths
more general
situations.
Also, slightly change the logic which decides when to prefix the
original element in order to prevent a pathspec of "." from getting
converted to "" (empty string).
Signed-off-by: Brandon Williams
---
pathspec.c | 33 +--
e
freed after getting the result from 'prefix_path()'.
Signed-off-by: Brandon Williams
---
builtin/mv.c | 50 +++---
1 file changed, 31 insertions(+), 19 deletions(-)
diff --git a/builtin/mv.c b/builtin/mv.c
index 2f43877..4e86dc5 100644
--- a/buil
ct, they need to be freed when clearing the
pathspec struct (in 'clear_pathspec()') and duplicated when copying the
pathspec struct (in 'copy_pathspec()').
Also change the type of 'match' and 'original' to 'char *' in order to
more explicitly show the
Removed unused variable 'n' from the 'unsupported_magic()' function.
Signed-off-by: Brandon Williams
---
pathspec.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 8f367f0..ec0d590 100644
--- a/pathspec.c
+++ b/pathspe
he old functionality
of modifying the const char **argv array that was passed into
parse_pathspec. Instead the constructed 'match' string (which is a
pathspec element with the prefix prepended) is only stored in its
corresponding pathspec_item entry.
Signed-off-by: Brandon Williams
--
A few small changes to improve readability. This is done by grouping related
assignments, adding blank lines, ensuring lines are <80 characters, and
adding additional comments.
Signed-off-by: Brandon Williams
---
pathspec.c | 25 +++--
1 file changed, 15 insertions(+),
Factor out the logic responsible for the magic in a pathspec element
into its own function.
Also avoid calling into the parsing functions when
`PATHSPEC_LITERAL_PATH` is specified since it causes magic to be
ignored and all paths to be treated as literals.
Signed-off-by: Brandon Williams
Factor out the logic responsible for stripping the trailing slash on
pathspecs referencing submodules into its own function.
Signed-off-by: Brandon Williams
---
pathspec.c | 68 ++
1 file changed, 42 insertions(+), 26 deletions
Factor out the logic responsible for parsing long magic into its own
function. As well as hoist the prefix check logic outside of the inner
loop as there isn't anything that needs to be done after matching
"prefix:".
Signed-off-by: Brandon Williams
---
Give a more relevant name to the prefix_pathspec function as it does
more than just prefix a pathspec element.
Signed-off-by: Brandon Williams
---
pathspec.c | 24 +++-
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 4ce2016
Factor out the logic responsible for parsing short magic into its own
function.
Signed-off-by: Brandon Williams
---
pathspec.c | 54 --
1 file changed, 36 insertions(+), 18 deletions(-)
diff --git a/pathspec.c b/pathspec.c
index 10ce9c1
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
---
pathspec.c | 127 +
1 file changed, 78
tch/push have been enabled via a new configuration
> mechanism.
>
> What's the doneness of this topic? Did we agree that it should be
> rebased on top of Peff's http-walker-limit-redirect series?
Yes I believe we agreed it should be rebased on Peff's series. I can do
that and send out another version.
--
Brandon Williams
atch by Jeff King
Signed-off-by: Brandon Williams
---
Documentation/config.txt | 46 ++
Documentation/git.txt| 38 +---
git-submodule.sh | 12 ++--
t/lib-proto-disable.sh | 130 +--
t/t5509-
Only difference between v8 and v9 is that v9 has been rebased ontop of Jeff's
http-walker-limit-redirect series 'jk/http-walker-limit-redirect'.
Brandon Williams (5):
lib-proto-disable: variable name fix
transport: add protocol policy config option
http: always warn if lib
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
---
t/lib-proto-disable.sh | 12 ++--
1 file changed, 6 insert
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: Bra
Move the creation of an allowed protocols whitelist to a helper
function.
Signed-off-by: Brandon Williams
---
http.c | 31 ---
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/http.c b/http.c
index 034426e..f7c488a 100644
--- a/http.c
+++ b/http.c
e provided which falls back to reading `GIT_PROTOCOL_FROM_USER`
to determine if the protocol came from the user.
Signed-off-by: Brandon Williams
---
http.c | 14 +++---
transport.c | 8 +---
transport.h | 13 ++---
3 files changed, 22 insertions(+), 13 deletions(-)
di
On 12/14, Jeff King wrote:
> On Tue, Dec 13, 2016 at 05:40:35PM -0800, Brandon Williams wrote:
>
> > diff --git a/transport.c b/transport.c
> > index e1ba78b..fbd799d 100644
> > --- a/transport.c
> > +++ b/transport.c
> > @@ -700,11 +700,6 @@ void tran
On 12/14, Jeff King wrote:
> On Tue, Dec 13, 2016 at 05:40:36PM -0800, Brandon Williams wrote:
>
> > Move the creation of an allowed protocols whitelist to a helper
> > function.
>
> This is "what" but not "why". You can figure it out if you see the
On 12/14, Jeff King wrote:
> On Tue, Dec 13, 2016 at 05:40:37PM -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
On 12/14, Brandon Williams wrote:
> On 12/14, Jeff King wrote:
> > On Tue, Dec 13, 2016 at 05:40:37PM -0800, Brandon Williams wrote:
> >
> > > Add the from_user parameter to the 'is_transport_allowed' function.
> > > This allows callers to quer
On 12/14, Jeff King wrote:
> On Wed, Dec 14, 2016 at 12:37:52PM -0800, Brandon Williams wrote:
>
> > Naively looking at the code (and your longer suggestion), is there a
> > reason why we couldn't simply have http-walker set CURLOPT_PROTOCOLS
> > with get_cur
n top of your series, plus the other minor fixes
> we've discussed, the topic should be ready for 'next'.
Sounds good, I'll make those few changes, place this patch ontop of
the series and send out v10 of the series in just a bit.
--
Brandon Williams
401 - 500 of 2393 matches
Mail list logo