From: Jeff King
The http-walker may fetch the http-alternates (or
alternates) file from a remote in order to find more
objects. This should count as a "not from the user" use of
the protocol. But because we implement the redirection
ourselves and feed the new URL to curl, it will use the
CURLOPT_
respect configured
protocol policies.
Brandon Williams (5):
lib-proto-disable: variable name fix
http: always warn if libcurl version is too old
transport: add protocol policy config option
http: create function to get curl allowed protocols
transport: add from_user parameter to
M_USER` to determine if the protocol came from the
user.
Signed-off-by: Brandon Williams
---
http.c| 14 +++---
t/t5812-proto-disable-http.sh | 7 +++
transport.c | 8 +---
transport.h | 13 ++---
4 files c
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
ered differently.
--
Brandon Williams
Add the `is_submodule_initialized()` helper function to submodules.c.
`is_submodule_initialized()` performs a check to determine if the
submodule at the given path has been initialized.
Signed-off-by: Brandon Williams
---
submodule.c | 23 +++
submodule.h | 1 +
2 files
at it won't run on windows. This is due
to testing if colons in filenames are still handled correctly, yet windows
doesn't allow colons in filenames.
Brandon Williams (7):
submodules: add helper to determine if a submodule is populated
submodules: add helper to determine if a
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
---
cache.h| 2 ++
con
ff-by: Brandon Williams
---
Documentation/git-grep.txt | 5 +
builtin/grep.c | 300 ++---
git.c | 2 +-
t/t7814-grep-recurse-submodules.sh | 99
4 files changed, 386 insertions(+), 20 dele
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
---
grep.c | 16 +++-
grep.h | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
diff --
he command
`git grep -e. -l --recurse-submodules HEAD`
from:
HEAD:file
:sub/file
to:
HEAD:file
HEAD:sub/file
Signed-off-by: Brandon Williams
---
Documentation/git-grep.txt | 13 -
builtin/grep.c | 76 ---
t/t7814-grep-recurse-sub
he searching of history from a submodule's gitdir, rather
than from a working directory.
Signed-off-by: Brandon Williams
---
builtin/grep.c | 20 +--
t/t7814-grep-recurse-submodules.sh | 41 ++
2 files changed, 59 insertio
Add the `is_submodule_populated()` helper function to submodules.c.
`is_submodule_populated()` performes a check to see if a submodule has
been checkout out (and has a valid .git directory/file) at the given path.
Signed-off-by: Brandon Williams
---
submodule.c | 15 +++
submodule.h
nt SHA1 of each submodule. This would eliminate the merge conflicts
in the superproject that could occur if multiple people are contributing
to the same submodule.
Brandon Williams (3):
transport: refactor flag #defines to be more readable
submodules: add RECURSE_SUBMODULES_ONLY value
push: add
makes the defines easier to read.
Signed-off-by: Brandon Williams
---
transport.h | 30 +++---
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/transport.h b/transport.h
index b8e4ee8..1b65458 100644
--- a/transport.h
+++ b/transport.h
@@ -131,21 +131,21
Add the `RECURSE_SUBMODULES_ONLY` enum value to submodule.h. This enum
value will be used in a later patch to push to indicate that only
submodules should be pushed, while the superproject should remain
unpushed.
Signed-off-by: Brandon Williams
---
submodule-config.c | 2 ++
submodule.h
the superproject to the most
recent SHA1 of each submodule. This would eliminate the merge conflicts
in the superproject that could occur if multiple people are contributing
to the same submodule.
Signed-off-by: Brandon Williams
---
builtin/push.c | 2 ++
t/t5531-deep-submodule
t; void remove_untracked_cache(struct index_state *istate);
> extern void connect_work_tree_and_git_dir(const char *work_tree, const char
> *git_dir);
> -extern void relocate_gitdir(const char *path,
> - const char *old_git_dir,
> - const char *new_git_dir);
> +extern int relocate_gitdir(const char *path,
> +const char *old_git_dir,
> +const char *new_git_dir);
> #endif
> diff --git a/submodule.c b/submodule.c
> index 45ccfb7ab4..fa1f44bb5a 100644
> --- a/submodule.c
> +++ b/submodule.c
> @@ -1277,7 +1277,8 @@ static void
> relocate_single_git_dir_into_superproject(const char *prefix,
> prefix ? prefix : "", path,
> real_old_git_dir, real_new_git_dir);
>
> - relocate_gitdir(path, real_old_git_dir, real_new_git_dir);
> + if (relocate_gitdir(path, real_old_git_dir, real_new_git_dir))
> + die(_("could not relocate git directory of '%s'"), path);
>
> free(old_git_dir);
> free(real_old_git_dir);
> --
> 2.11.0.rc2.53.gb7b3fba.dirty
>
--
Brandon Williams
nd.h
> @@ -56,6 +56,10 @@ int finish_command(struct child_process *);
> int finish_command_in_signal(struct child_process *);
> int run_command(struct child_process *);
>
> +void start_command_or_die(struct child_process *);
> +void finish_command_or_die(struct child_process *);
> +void run_command_or_die(struct child_process *);
> +
> /*
> * Returns the path to the hook file, or NULL if the hook is missing
> * or disabled. Note that this points to static storage that will be
> --
> 2.11.0.rc2.53.gb7b3fba.dirty
>
--
Brandon Williams
uf_reset(resolved);
> + strbuf_add(resolved, remaining->buf, offset);
> +#ifdef GIT_WINDOWS_NATIVE
> + convert_slashes(resolved->buf);
> +#endif
So then the only extra cononicalization that is happening here is
converting '\\server\share' to '//server/share'? (or 'c:\' to 'c:/')
--
Brandon Williams
On 12/22, Johannes Sixt wrote:
> Am 21.12.2016 um 23:33 schrieb Brandon Williams:
> >On 12/21, Johannes Sixt wrote:
> >>+/* copies root part from remaining to resolved, canonicalizing it on the
> >>way */
> >>+static void get_root_part(struct strbuf *res
;&
> + item->prefix <= item->len)
> + die (_("Path leads inside submodule '%s', but the submodule "
> +"was not recognized, i.e. not initialized or deleted"),
> + ce->name);
> return magic;
I haven't been following everything on the list these past couple days,
but are we sure this is caused by submodules? Also variable 'ce'
shouldn't be in scope here.
--
Brandon Williams
nitialized or deleted"),
> +item->original);
> return magic;
> }
Turns out I should comment on the most recent version of the patch :P
This looks better to me. (It resolves the issue with using a variable
not in scope).
--
Brandon Williams
spec struct interface
> - dir: remove struct path_simplify
> - mv: remove use of deprecated 'get_pathspec()'
>
> Code clean-up in the pathspec API.
>
> Waiting for the (hopefully) final round of review before 'next'.
What more needs to be reviewed for this series?
--
Brandon Williams
On 01/03, Duy Nguyen wrote:
> On Thu, Dec 29, 2016 at 5:06 PM, Duy Nguyen wrote:
> > On Thu, Dec 29, 2016 at 1:18 AM, Brandon Williams wrote:
> >> On 12/27, Junio C Hamano wrote:
> >>> * bw/pathspec-cleanup (2016-12-14) 16 commits
> >>> - pathspec: re
On 01/03, Duy Nguyen wrote:
> On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams wrote:
> > @@ -340,8 +336,9 @@ static void NORETURN unsupported_magic(const char
> > *pattern,
> > continue;
> > if (sb.len)
> >
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 1df61f10f..e8
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 '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
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 2f43877bc..4e86dc523 100644
--- a/b
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 +--
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 b8faa8f46..b9a3819d6 100644
--- a/pathspec.c
+++ b/
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
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 | 24 +---
1 file changed, 9 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
--
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 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 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 f760f44f9
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(+),
v4 addresses a few comments from Duy.
* [2/16] push the guard pathspec macro into simplify_away() and
exclude_matches_pathsepc().
* [6/16] when freeing a pathspec struct, set pathsepc->nr = 0.
* [8/16] tweak the die message when using unsupported magic to be more human
readable.
Bran
vis-ci.org/jobs/187092215/log.txt
>
> - Lars
>
Simple fix would be to just revert MAXSYMLINKS to be MAXDEPTH (which is
what the #define was before this series). I'll resend the series with
that fix.
--
Brandon Williams
Only change with v4 is in [1/5] renaming the #define MAXSYMLINKS back to
MAXDEPTH due to a naming conflict brought up by Lars Schneider.
Brandon Williams (4):
real_path: resolve symlinks by hand
real_path: convert real_path_internal to strbuf_realpath
real_path: create real_pathdup
aking real_path one step closer to being reentrant.
Signed-off-by: Brandon Williams
---
abspath.c | 188 ++
1 file changed, 128 insertions(+), 60 deletions(-)
diff --git a/abspath.c b/abspath.c
index 2825de859..0f34636a8 100644
--- a/absp
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
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
From: Johannes Sixt
When an absolute path is resolved, resolution begins at the first path
component after the root part. The root part is just copied verbatim,
because it must not be inspected for symbolic links. For POSIX paths,
this is just the initial slash, but on Windows, the root part has
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 c3a6acd4d..f4283f465 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 | 13 -
sha1_file.c | 2 +-
submodule.c | 2
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 ae9e1401f
On 01/04, Duy Nguyen wrote:
> On Wed, Jan 4, 2017 at 1:42 AM, Brandon Williams wrote:
> > diff --git a/dir.c b/dir.c
> > index 15f7c9993..e8ddd7f8a 100644
> > --- a/dir.c
> > +++ b/dir.c
> > @@ -1353,6 +1353,15 @@ static int simplify_away(const char *path, int
&g
On 01/04, Brandon Williams wrote:
> On 01/04, Duy Nguyen wrote:
> > On Wed, Jan 4, 2017 at 1:42 AM, Brandon Williams wrote:
> > > diff --git a/dir.c b/dir.c
> > > index 15f7c9993..e8ddd7f8a 100644
> > > --- a/dir.c
> > > +++ b/dir.c
> > > @@ -
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
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 | 24 +---
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/pathspec.c b/paths
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 77df55da6
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 +--
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
---
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
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
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 e53530e7a
Changes in v5:
* Move GUARD_PATHSPEC to prevent checking if pathspec is null twice.
* Mark a string containing 'mnemonic' for translation.
Brandon Williams (16):
mv: remove use of deprecated 'get_pathspec()'
dir: remove struct path_simplify
dir: convert fill_directory
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
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
--
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 2f43877bc..4e86dc523 100644
--- a/b
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 b8faa8f46..b9a3819d6 100644
--- a/pathspec.c
+++ b/
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 9ae454dde..bc
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
On 01/04, Jeff King wrote:
> On Wed, Jan 04, 2017 at 07:56:02AM +0100, Torsten Bögershausen wrote:
>
> > On 04.01.17 01:48, Jeff King wrote:
> > > On Tue, Jan 03, 2017 at 11:09:18AM -0800, Brandon Williams wrote:
> > >
> > >> Only change with v4 is in [
On 01/03, Jacob Keller wrote:
> On Tue, Jan 3, 2017 at 11:09 AM, Brandon Williams wrote:
> > Migrate callers of real_path() who duplicate the retern value to use
> > real_pathdup or strbuf_realpath.
>
> Nit: s/retern/return
Thanks for catching that, I'll f
structing a
pathspec object probably isn't the best place for determining if the
submodule's gitdir has been destroyed and instead it has fallen back to
its parent's gitdir. A check for something like this should happen much
sooner.
There are cases where it is advantages to be able to supply a pathspec
into a submodule without it erroring out (git grep --recurse-submodules
is one example). So right now the current method for not allowing a
pathspec into a submodule is to pass the STRIP_SUBMODULE_SLASH_EXPENSIVE
flag when creating the pathspec object.
--
Brandon Williams
aking real_path one step closer to being reentrant.
Signed-off-by: Brandon Williams
---
abspath.c | 194 ++
1 file changed, 133 insertions(+), 61 deletions(-)
diff --git a/abspath.c b/abspath.c
index 2825de859..629201e48 100644
--- a/absp
Migrate callers of real_path() who duplicate the return 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
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 a200d4220..72f716f80 100644
changes in v5:
* set errno to ELOOP when MAXSYMLINKS is exceded.
* revert to use MAXSYMLINKS instead of MAXDEPTH.
* If the OS hasn't defined MAXSYMLINKS, use a fallback value of 32.
Brandon Williams (4):
real_path: resolve symlinks by hand
real_path: convert real_path_intern
On 01/04, Jacob Keller wrote:
> On Wed, Jan 4, 2017 at 10:22 AM, Stefan Beller wrote:
> > On Wed, Jan 4, 2017 at 10:13 AM, Brandon Williams wrote:
> >> On 01/04, Jeff King wrote:
> >>> On Wed, Jan 04, 2017 at 07:56:02AM +0100, Torsten Bögershausen wrote:
> &g
From: Johannes Sixt
When an absolute path is resolved, resolution begins at the first path
component after the root part. The root part is just copied verbatim,
because it must not be inspected for symbolic links. For POSIX paths,
this is just the initial slash, but on Windows, the root part has
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
t; +
> +TEST_CREATE_SUBMODULE=yes
> +. ./test-lib.sh
> +
> +test_expect_success 'setup a submodule' '
> + git submodule add ./pretzel.bare sub &&
> + git commit -a -m "add submodule" &&
> + git submodule deinit --all
> +'
> +
> +cat <expect
> +fatal: Pathspec 'sub/a' is in submodule 'sub'
> +EOF
> +
> +test_expect_success 'error message for path inside submodule' '
> + echo a >sub/a &&
> + test_must_fail git add sub/a 2>actual &&
> + test_cmp expect actual
> +'
> +
> +cat <expect
> +fatal: Pathspec '.' is in submodule 'sub'
> +EOF
> +
> +test_expect_success 'error message for path inside submodule from within
> submodule' '
> + test_must_fail git -C sub add . 2>actual &&
> + test_cmp expect actual
> +'
> +
> +test_done
I haven't taken a through look at this patch but I think you may want to
base it off of 'origin/bw/pathspec-cleanup' series as the changes made in this
patch now conflict with that series.
Also I still don't really think this solves the problem of telling the
user what is wrong, which is that the submodule's gitdir is gone.
--
Brandon Williams
On 01/07, Duy Nguyen wrote:
> On Thu, Jan 5, 2017 at 1:03 AM, Brandon Williams wrote:
> > Changes in v5:
> > * Move GUARD_PATHSPEC to prevent checking if pathspec is null twice.
> > * Mark a string containing 'mnemonic' for translation.
>
> Argh.. I'v
On 01/07, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > changes in v5:
> > * set errno to ELOOP when MAXSYMLINKS is exceded.
> > * revert to use MAXSYMLINKS instead of MAXDEPTH.
> > * If the OS hasn't defined MAXSYMLINKS, use a fallback value
On 01/09, Junio C Hamano wrote:
> Brandon Williams writes:
>
> >> How does this relate to the 5-patch real_path: series that has been
> >> on 'next' since last year?
> >
> > The only difference should be in the first patch of the series which
> &
The macro 'MAXSYMLINKS' is already defined on macOS and Linux in
. If 'MAXSYMLINKS' has already been defined, use the value
defined by the OS otherwise default to a value of 32 which is more
inline with what is allowed by many systems.
Signed-off-by: Brandon Williams
---
a
Set errno to ELOOP when the maximum number of symlinks is exceeded, as
would be done by other symlink-resolving functions.
Signed-off-by: Brandon Williams
---
abspath.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/abspath.c b/abspath.c
index 0393213e5..fce40fddc 100644
--- a/abspath.c
Improve constness of the index_state parameter to the
'read_blob_data_from_index' function.
Signed-off-by: Brandon Williams
---
cache.h | 2 +-
read-cache.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cache.h b/cache.h
index a50a61a19..363953c1a 10
y the attribute stack only needs to be scanned a
single time prior to attribute collection instead of each time a macro
needs to be expanded.
Signed-off-by: Brandon Williams
---
attr.c | 69 ++
attr.h | 6 ++
2 files changed, 3
From: Junio C Hamano
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
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
Documentation/technical/api-gitattributes.txt | 86
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
---
attr.c | 33 +
uct with data
that can be used in optimizing the query for the specific N
attributes it contains.
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
archive.c | 24 ++--
builtin/pack-objects.c | 19 +--
co
names and initialize this
structure.
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 74 ++
attr.h | 17 +++
2 files changed, 91 insertions(+)
diff --git a/attr.
y spell out what the
rules for a good attribute name are, etc.
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 34 --
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/attr.c b/attr.c
index
d() to add attribute names
one by one.
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 38 -
attr.h | 9 +++-
builtin/check-attr.c | 60 ++-
Signed-off-by: Brandon Williams
---
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
+++ b/attr.c
@@ -209,7 +209,7
he attribute system and should be handled with care.
Signed-off-by: Brandon Williams
---
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
g 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
---
attr.c | 375 +
1 file changed, 235 insertions(+
essing the
dictionary of interned attributes.
Signed-off-by: Brandon Williams
---
attr.c| 171 ++
attr.h| 2 +
common-main.c | 3 ++
3 files changed, 131 insertions(+), 45 deletions(-)
diff --git a/attr.c b/attr.c
index
ance which is then used in the attribute collection
process. This brings the attribute system one step closer to being
thread-safe.
Signed-off-by: Brandon Williams
---
attr.c | 114 +++--
attr.h | 2 ++
2 files changed, 78 insert
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 Willia
From: Junio C Hamano
It holds an interned string, and git_attr_name() is a way to peek
into it. Make sure the involved pointer types are pointer-to-const.
Signed-off-by: Junio C Hamano
Signed-off-by: Stefan Beller
Signed-off-by: Brandon Williams
---
attr.c | 2 +-
attr.h | 4 ++--
2 files
1 - 100 of 2393 matches
Mail list logo