[PATCH 3/2] ls-files: only recurse on active submodules

2017-04-13 Thread Brandon Williams
Add in a check to see if a submodule is active before attempting to recurse. This prevents 'ls-files' from trying to operate on a submodule which may not exist in the working directory. Signed-off-by: Brandon Williams --- After you mentioned possibly needing to check if a su

Re: [PATCH 2/4] submodule.c: uninitialized submodules are ignored in recursive commands

2017-04-13 Thread Brandon Williams
_sub1 uninitialized_sub && The 'submodule add' command will make the submodule active, so you'll need to add in a line to subsequently make the submodule inactive for this to work, unless you do in at a later point in time. > git config -f .gitmodules submodule.sub1.ignore all && > git config submodule.sub1.ignore all && > git add .gitmodules && > -- > 2.12.2.603.g7b28dc31ba > -- Brandon Williams

Re: [PATCH 3/4] submodule.c: harden submodule_move_head against broken submodules

2017-04-13 Thread Brandon Williams
eptable to complain and do nothing/ignore it, in the future we may want to actually clone and then check it out. -- Brandon Williams

Re: [PATCH 2/4] submodule.c: uninitialized submodules are ignored in recursive commands

2017-04-13 Thread Brandon Williams
On 04/13, Stefan Beller wrote: > On Thu, Apr 13, 2017 at 12:05 PM, Brandon Williams wrote: > > On 04/11, Stefan Beller wrote: > >> This was an oversight when working on the working tree modifying commands > >> recursing into submodules. > >> > >> To

Re: [PATCH v2 4/6] run-command: don't die in child when duping /dev/null

2017-04-13 Thread Brandon Williams
On 04/13, Eric Wong wrote: > Brandon Williams wrote: > > @@ -487,7 +483,7 @@ int start_command(struct child_process *cmd) > > atexit(notify_parent); > > > > if (cmd->no_stdin) > > - dup_devnull(0); > > +

Re: [PATCH v2 1/6] t5550: use write_script to generate post-update hook

2017-04-13 Thread Brandon Williams
On 04/13, Eric Wong wrote: > Jonathan Nieder wrote: > > Brandon Williams wrote: > > > The post-update hooks created in t5550-http-fetch-dumb.sh is missing the > > > "!#/bin/sh" line which can cause issues with portability. Instead > > > create th

Re: [PATCH v2 2/6] run-command: prepare command before forking

2017-04-13 Thread Brandon Williams
On 04/13, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > In order to avoid allocation between 'fork()' and 'exec()' the argv > > array used in the exec call is prepared prior to forking the process. > > nit: s/(the argv array.*)

Re: [PATCH] submodule--helper: fix typo in is_active error message

2017-04-13 Thread Brandon Williams
die("submodule--helper is-active takes exactly 1 arguments"); > + die("submodule--helper is-active takes exactly 1 argument"); Obvious fix. Thanks! > > gitmodules_config(); > > -- > 2.12.2.603.g7b28dc31ba > -- Brandon Williams

Re: [PATCH 7/6] run-command: block signals between fork and execve

2017-04-13 Thread Brandon Williams
On 04/13, Eric Wong wrote: > Brandon Williams wrote: > > v2 does a bit of restructuring based on comments from reviewers. I took the > > patch by Eric and broke it up and tweaked it a bit to flow better with v2. > > I > > left out the part of Eric's patch wh

Re: [PATCH v2 0/6] forking and threading

2017-04-13 Thread Brandon Williams
On 04/13, Jonathan Nieder wrote: > Brandon Williams wrote: > > > From what I can see, there are now no calls in the child process (after fork > > and before exec/_exit) which are not Async-Signal-Safe. This means that > > fork/exec in a threaded context should work witho

Re: [PATCH 7/6] run-command: block signals between fork and execve

2017-04-13 Thread Brandon Williams
md->dir); > break; > + case CHILD_ERR_SIGPROCMASK: > + error_errno("sigprocmask failed restoring signals"); missing a break statement here I'll add it in, in the re-roll. > case CHILD_ERR_ENOENT: > error_errno("cannot run %s", cmd->argv[0]); > break; -- Brandon Williams

[PATCH v3 00/10] forking and threading

2017-04-14 Thread Brandon Williams
ng the shell to interpret the command Brandon Williams (9): t5550: use write_script to generate post-update hook t0061: run_command executes scripts without a #! line run-command: prepare command before forking run-command: use the async-signal-safe execv instead of execvp run-command: prepare ch

[PATCH v3 03/10] run-command: prepare command before forking

2017-04-14 Thread Brandon Williams
ng the process. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html Signed-off-by: Brandon Williams --- run-command.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/run-command.c b/run-command.c index 57

[PATCH v3 08/10] run-command: handle dup2 and close errors in child

2017-04-14 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 58 ++ 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/run-command.c b/run-command.c index 25b487c35..f36eafa8d 100644 --- a/run-command.c +++ b/run-command.c @@ -213,6

[PATCH v3 07/10] run-command: eliminate calls to error handling functions in child

2017-04-14 Thread Brandon Williams
reporting happens from the parent; even avoiding functions like atexit(3) and exit(3). Helped-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 121 ++ 1 file changed, 89 insertions(+), 32 deletions(-) diff --git a/run-command.c

[PATCH v3 10/10] run-command: block signals between fork and execve

2017-04-14 Thread Brandon Williams
. Similarly, disable pthread cancellation to future-proof our code in case we start using cancellation; as cancellation is implemented with signals in glibc. Signed-off-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 70

[PATCH v3 06/10] run-command: don't die in child when duping /dev/null

2017-04-14 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/run-command.c b/run-command.c index 5864b5ff3..ee2c680ab 100644 --- a/run-command.c +++ b/run-command.c @@ -117,18 +117,6 @@ static inline void

[PATCH v3 05/10] run-command: prepare child environment before forking

2017-04-14 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' prepare the environment to be used in the child process prior to forking. Switch to using 'execve()' so that the construct child environment can used in the exec'd process. Signed-off-by: Brando

[PATCH v3 09/10] run-command: add note about forking and threading

2017-04-14 Thread Brandon Williams
of the code know to only use Async-Signal-Safe functions in the child process. Signed-off-by: Brandon Williams --- run-command.c | 9 + 1 file changed, 9 insertions(+) diff --git a/run-command.c b/run-command.c index f36eafa8d..d3a32eab6 100644 --- a/run-command.c +++ b/run-command.c @@

[PATCH v3 01/10] t5550: use write_script to generate post-update hook

2017-04-14 Thread Brandon Williams
The post-update hooks created in t5550-http-fetch-dumb.sh is missing the "!#/bin/sh" line which can cause issues with portability. Instead create the hook using the 'write_script' function which includes the proper "#!" line. Signed-off-by: Brandon Williams ---

[PATCH v3 04/10] run-command: use the async-signal-safe execv instead of execvp

2017-04-14 Thread Brandon Williams
ttempt to execute the command by interpreting it with the 'sh' utility. To maintain this functionality, if 'execv()' fails with ENOEXEC, start_command will atempt to execute the command by interpreting it with 'sh'. [1] http://pubs.opengroup.org/onlinepubs/0096953

[PATCH v3 02/10] t0061: run_command executes scripts without a #! line

2017-04-14 Thread Brandon Williams
Add a test to 't0061-run-command.sh' to ensure that run_command can continue to execute scripts which don't include a '#!' line. Signed-off-by: Brandon Williams --- t/t0061-run-command.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/t/t0061-run

Re: [PATCH v3 06/10] run-command: don't die in child when duping /dev/null

2017-04-14 Thread Brandon Williams
On 04/14, Eric Wong wrote: > Brandon Williams wrote: > > + if (cmd->no_stdin || cmd->no_stdout || cmd->no_stderr) { > > + null_fd = open("/dev/null", O_RDWR | O_CLOEXEC | O_NONBLOCK); > > O_NONBLOCK? This was in my original patch, too :x >

Re: [PATCH v3 07/10] run-command: eliminate calls to error handling functions in child

2017-04-14 Thread Brandon Williams
On 04/14, Eric Wong wrote: > Brandon Williams wrote: > > +++ b/run-command.c > > @@ -211,14 +211,82 @@ static const char **prepare_shell_cmd(struct > > argv_array *out, const char **argv) > > #ifndef GIT_WINDOWS_NATIVE > > static int child_notifier = -1; >

Re: [PATCH v3 10/10] run-command: block signals between fork and execve

2017-04-14 Thread Brandon Williams
On 04/14, Brandon Williams wrote: > /* > + * restore default signal handlers here, in case > + * we catch a signal right before execve below > + */ > + for (sig = 1; sig < NSIG; sig++) { > +

[PATCH v4 01/10] t5550: use write_script to generate post-update hook

2017-04-17 Thread Brandon Williams
The post-update hooks created in t5550-http-fetch-dumb.sh is missing the "!#/bin/sh" line which can cause issues with portability. Instead create the hook using the 'write_script' function which includes the proper "#!" line. Signed-off-by: Brandon Williams ---

[PATCH v4 00/10] forking and threading

2017-04-17 Thread Brandon Williams
v4 fixes a few minor compatability issues: * add 'extern' reference for 'environ' * small portability change with the signal handeling * remove trailing ',' in enum * null_fd not opened with O_NONBLOCK Brandon Williams (9): t5550: use write_script to gen

[PATCH v4 09/10] run-command: add note about forking and threading

2017-04-17 Thread Brandon Williams
of the code know to only use Async-Signal-Safe functions in the child process. Signed-off-by: Brandon Williams --- run-command.c | 9 + 1 file changed, 9 insertions(+) diff --git a/run-command.c b/run-command.c index bd6414283..c27c53bc5 100644 --- a/run-command.c +++ b/run-command.c @@

[PATCH v4 03/10] run-command: prepare command before forking

2017-04-17 Thread Brandon Williams
ng the process. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html Signed-off-by: Brandon Williams --- run-command.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/run-command.c b/run-command.c index 57

[PATCH v4 02/10] t0061: run_command executes scripts without a #! line

2017-04-17 Thread Brandon Williams
Add a test to 't0061-run-command.sh' to ensure that run_command can continue to execute scripts which don't include a '#!' line. Signed-off-by: Brandon Williams --- t/t0061-run-command.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/t/t0061-run

[PATCH v4 04/10] run-command: use the async-signal-safe execv instead of execvp

2017-04-17 Thread Brandon Williams
ttempt to execute the command by interpreting it with the 'sh' utility. To maintain this functionality, if 'execv()' fails with ENOEXEC, start_command will atempt to execute the command by interpreting it with 'sh'. [1] http://pubs.opengroup.org/onlinepubs/0096953

[PATCH v4 10/10] run-command: block signals between fork and execve

2017-04-17 Thread Brandon Williams
. Similarly, disable pthread cancellation to future-proof our code in case we start using cancellation; as cancellation is implemented with signals in glibc. Signed-off-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 68

[PATCH v4 06/10] run-command: don't die in child when duping /dev/null

2017-04-17 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/run-command.c b/run-command.c index 2fff60a04..3aa8b7112 100644 --- a/run-command.c +++ b/run-command.c @@ -117,18 +117,6 @@ static inline void

[PATCH v4 07/10] run-command: eliminate calls to error handling functions in child

2017-04-17 Thread Brandon Williams
reporting happens from the parent; even avoiding functions like atexit(3) and exit(3). Helped-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 121 ++ 1 file changed, 89 insertions(+), 32 deletions(-) diff --git a/run-command.c

[PATCH v4 05/10] run-command: prepare child environment before forking

2017-04-17 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' prepare the environment to be used in the child process prior to forking. Switch to using 'execve()' so that the construct child environment can used in the exec'd process. Signed-off-by: Brando

[PATCH v4 08/10] run-command: handle dup2 and close errors in child

2017-04-17 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 58 ++ 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/run-command.c b/run-command.c index e1e8780ca..bd6414283 100644 --- a/run-command.c +++ b/run-command.c @@ -213,6

Re: [PATCH v4 05/10] run-command: prepare child environment before forking

2017-04-18 Thread Brandon Williams
e done so as you're correct, they should be case-sensitive. Jonathan pointed out that doing this env stuff in vanilla C may not be a good idea...and I kinda forgot about that cause it worked (it passed tests) Let me re-write this section of code to make it correct, and saner. -- Brandon Williams

[PATCH v5 02/11] t0061: run_command executes scripts without a #! line

2017-04-18 Thread Brandon Williams
Add a test to 't0061-run-command.sh' to ensure that run_command can continue to execute scripts which don't include a '#!' line. Signed-off-by: Brandon Williams --- t/t0061-run-command.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/t/t0061-run

[PATCH v5 01/11] t5550: use write_script to generate post-update hook

2017-04-18 Thread Brandon Williams
The post-update hooks created in t5550-http-fetch-dumb.sh is missing the "!#/bin/sh" line which can cause issues with portability. Instead create the hook using the 'write_script' function which includes the proper "#!" line. Signed-off-by: Brandon Williams ---

[PATCH v5 05/11] string-list: add string_list_remove function

2017-04-18 Thread Brandon Williams
Teach string-list to be able to remove a string from a sorted 'struct string_list'. Signed-off-by: Brandon Williams --- string-list.c | 18 ++ string-list.h | 5 + 2 files changed, 23 insertions(+) diff --git a/string-list.c b/string-list.c index 45016ad86.

[PATCH v5 03/11] run-command: prepare command before forking

2017-04-18 Thread Brandon Williams
ng the process. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html Signed-off-by: Brandon Williams --- run-command.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/run-command.c b/run-command.c index 57

[PATCH v5 00/11] forking and threading

2017-04-18 Thread Brandon Williams
rom a string_list to the string_list API. Brandon Williams (10): t5550: use write_script to generate post-update hook t0061: run_command executes scripts without a #! line run-command: prepare command before forking run-command: use the async-signal-safe execv instead of execvp string-list

[PATCH v5 07/11] run-command: don't die in child when duping /dev/null

2017-04-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/run-command.c b/run-command.c index 15e2e74a7..b3a35dd82 100644 --- a/run-command.c +++ b/run-command.c @@ -117,18 +117,6 @@ static inline void

[PATCH v5 10/11] run-command: add note about forking and threading

2017-04-18 Thread Brandon Williams
of the code know to only use Async-Signal-Safe functions in the child process. Signed-off-by: Brandon Williams --- run-command.c | 9 + 1 file changed, 9 insertions(+) diff --git a/run-command.c b/run-command.c index 615b6e9c9..df1edd963 100644 --- a/run-command.c +++ b/run-command.c @@

[PATCH v5 04/11] run-command: use the async-signal-safe execv instead of execvp

2017-04-18 Thread Brandon Williams
ttempt to execute the command by interpreting it with the 'sh' utility. To maintain this functionality, if 'execv()' fails with ENOEXEC, start_command will atempt to execute the command by interpreting it with 'sh'. [1] http://pubs.opengroup.org/onlinepubs/0096953

[PATCH v5 08/11] run-command: eliminate calls to error handling functions in child

2017-04-18 Thread Brandon Williams
reporting happens from the parent; even avoiding functions like atexit(3) and exit(3). Helped-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 121 ++ 1 file changed, 89 insertions(+), 32 deletions(-) diff --git a/run-command.c

[PATCH v5 11/11] run-command: block signals between fork and execve

2017-04-18 Thread Brandon Williams
. Similarly, disable pthread cancellation to future-proof our code in case we start using cancellation; as cancellation is implemented with signals in glibc. Signed-off-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 68

[PATCH v5 06/11] run-command: prepare child environment before forking

2017-04-18 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' prepare the environment to be used in the child process prior to forking. Switch to using 'execve()' so that the construct child environment can used in the exec'd process. Signed-off-by: Brando

[PATCH v5 09/11] run-command: handle dup2 and close errors in child

2017-04-18 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 58 ++ 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/run-command.c b/run-command.c index 1f15714b1..615b6e9c9 100644 --- a/run-command.c +++ b/run-command.c @@ -213,6

Re: [PATCH] clone: add a --no-tags option to clone without tags

2017-04-18 Thread Brandon Williams
gt; git clone --single-branch --no-tags g...@github.com:git/git.git > > Or in the case of cloning a single tag "branch": > > git clone --single-branch --branch v2.12.0 --no-tags > g...@github.com:git/git.git > > Signed-off-by: Ævar Arnfjörð Bjarmason > --- Patch seems sane to me. -- Brandon Williams

Re: [PATCH v5 05/11] string-list: add string_list_remove function

2017-04-18 Thread Brandon Williams
On 04/18, Stefan Beller wrote: > On Tue, Apr 18, 2017 at 4:17 PM, Brandon Williams wrote: > > > > > +void string_list_remove(struct string_list *list, const char *string, > > + int free_util) > > +{ > > + int exact_match; >

Re: [PATCH v5 02/11] t0061: run_command executes scripts without a #! line

2017-04-19 Thread Brandon Williams
On 04/19, Johannes Sixt wrote: > Am 19.04.2017 um 07:43 schrieb Johannes Sixt: > >Am 19.04.2017 um 01:17 schrieb Brandon Williams: > >>Add a test to 't0061-run-command.sh' to ensure that run_command can > >>continue to execute scripts which don't include

Re: [PATCH v5 11/11] run-command: block signals between fork and execve

2017-04-19 Thread Brandon Williams
On 04/19, Eric Wong wrote: > Johannes Sixt wrote: > > Am 19.04.2017 um 01:18 schrieb Brandon Williams: > > >@@ -400,6 +404,53 @@ static char **prep_childenv(const char *const > > >*deltaenv) > > > } > > > #endif > > > > > &g

[PATCH v6 01/11] t5550: use write_script to generate post-update hook

2017-04-19 Thread Brandon Williams
The post-update hooks created in t5550-http-fetch-dumb.sh is missing the "!#/bin/sh" line which can cause issues with portability. Instead create the hook using the 'write_script' function which includes the proper "#!" line. Signed-off-by: Brandon Williams ---

[PATCH v6 00/11] forking and threading

2017-04-19 Thread Brandon Williams
Changes in v6: * fix some windows compat issues * better comment on the string_list_remove function (also marked extern) Brandon Williams (10): t5550: use write_script to generate post-update hook t0061: run_command executes scripts without a #! line run-command: prepare command before

[PATCH v6 10/11] run-command: add note about forking and threading

2017-04-19 Thread Brandon Williams
of the code know to only use Async-Signal-Safe functions in the child process. Signed-off-by: Brandon Williams --- run-command.c | 9 + 1 file changed, 9 insertions(+) diff --git a/run-command.c b/run-command.c index 615b6e9c9..df1edd963 100644 --- a/run-command.c +++ b/run-command.c @@

[PATCH v6 11/11] run-command: block signals between fork and execve

2017-04-19 Thread Brandon Williams
. Similarly, disable pthread cancellation to future-proof our code in case we start using cancellation; as cancellation is implemented with signals in glibc. Signed-off-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 68

[PATCH v6 08/11] run-command: eliminate calls to error handling functions in child

2017-04-19 Thread Brandon Williams
reporting happens from the parent; even avoiding functions like atexit(3) and exit(3). Helped-by: Eric Wong Signed-off-by: Brandon Williams --- run-command.c | 121 ++ 1 file changed, 89 insertions(+), 32 deletions(-) diff --git a/run-command.c

[PATCH v6 09/11] run-command: handle dup2 and close errors in child

2017-04-19 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 58 ++ 1 file changed, 42 insertions(+), 16 deletions(-) diff --git a/run-command.c b/run-command.c index 1f15714b1..615b6e9c9 100644 --- a/run-command.c +++ b/run-command.c @@ -213,6

[PATCH v6 04/11] run-command: use the async-signal-safe execv instead of execvp

2017-04-19 Thread Brandon Williams
ttempt to execute the command by interpreting it with the 'sh' utility. To maintain this functionality, if 'execv()' fails with ENOEXEC, start_command will atempt to execute the command by interpreting it with 'sh'. [1] http://pubs.opengroup.org/onlinepubs/0096953

[PATCH v6 05/11] string-list: add string_list_remove function

2017-04-19 Thread Brandon Williams
Teach string-list to be able to remove a string from a sorted 'struct string_list'. Signed-off-by: Brandon Williams --- string-list.c | 18 ++ string-list.h | 7 +++ 2 files changed, 25 insertions(+) diff --git a/string-list.c b/string-list.c index 45016ad86.

[PATCH v6 07/11] run-command: don't die in child when duping /dev/null

2017-04-19 Thread Brandon Williams
Signed-off-by: Brandon Williams --- run-command.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/run-command.c b/run-command.c index 15e2e74a7..b3a35dd82 100644 --- a/run-command.c +++ b/run-command.c @@ -117,18 +117,6 @@ static inline void

[PATCH v6 03/11] run-command: prepare command before forking

2017-04-19 Thread Brandon Williams
ng the process. [1] http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html Signed-off-by: Brandon Williams --- run-command.c | 46 ++ 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/run-command.c b/run-command.c index 57

[PATCH v6 02/11] t0061: run_command executes scripts without a #! line

2017-04-19 Thread Brandon Williams
Add a test to 't0061-run-command.sh' to ensure that run_command can continue to execute scripts which don't include a '#!' line. Signed-off-by: Brandon Williams --- t/t0061-run-command.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/t/t0061-run

[PATCH v6 06/11] run-command: prepare child environment before forking

2017-04-19 Thread Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' prepare the environment to be used in the child process prior to forking. Switch to using 'execve()' so that the construct child environment can used in the exec'd process. Signed-off-by: Brando

Re: What's cooking in git.git (Apr 2017, #04; Wed, 19)

2017-04-20 Thread Brandon Williams
ion (which does not seem to have made it to `pu` yet) has the > !MINGW prerequisite which should fix the issue. Hopefully my suggested > addition to the commit message will make it into the commit history, too. Thanks for catching this. And as you pointed out the latest reroll should fix the issue. > > Ciao, > Dscho -- Brandon Williams

Re: [PATCH v6 02/11] t0061: run_command executes scripts without a #! line

2017-04-20 Thread Brandon Williams
On 04/20, Johannes Schindelin wrote: > Hi Brandon, > > On Wed, 19 Apr 2017, Brandon Williams wrote: > > > Add a test to 't0061-run-command.sh' to ensure that run_command can > > continue to execute scripts which don't include a '#!' line. > >

Re: [PATCH v5 02/11] t0061: run_command executes scripts without a #! line

2017-04-20 Thread Brandon Williams
On 04/20, Johannes Schindelin wrote: > Hi Brandon, > > On Wed, 19 Apr 2017, Brandon Williams wrote: > > > On 04/19, Johannes Sixt wrote: > > > Am 19.04.2017 um 07:43 schrieb Johannes Sixt: > > > >Am 19.04.2017 um 01:17 schrieb Brandon Williams: > >

Re: [PATCHv2 0/4] recursive submodules: git-reset!

2017-04-20 Thread Brandon Williams
t.c| 30 ++ > entry.c| 8 > submodule.c| 31 +++ > t/lib-submodule-update.sh | 24 +--- > t/t7112-reset-submodule.sh | 8 > unpack-trees.c | 7 ++- > 6 files changed, 96 insertions(+), 12 deletions(-) > > -- Brandon Williams

Re: [PATCH v5 02/11] t0061: run_command executes scripts without a #! line

2017-04-20 Thread Brandon Williams
On 04/20, Johannes Schindelin wrote: > Hi Brandon, > > On Thu, 20 Apr 2017, Brandon Williams wrote: > > > On 04/20, Johannes Schindelin wrote: > > > > > > On Wed, 19 Apr 2017, Brandon Williams wrote: > > > > > > > On 04/19, Johannes Sixt

Re: [PATCH 1/2] submodule.c: add has_submodules to check if we have any submodules

2017-04-20 Thread Brandon Williams
> diff --git a/submodule.h b/submodule.h > index 8a8bc49dc9..5ec72fbb16 100644 > --- a/submodule.h > +++ b/submodule.h > @@ -1,6 +1,12 @@ > #ifndef SUBMODULE_H > #define SUBMODULE_H > > +#define SUBMODULE_CHECK_ANY_CONFIG (1<<0) > +#define SUBMODULE_CHECK_ABSORBED_GIT_DIRS(1<<1) > +#define SUBMODULE_CHECK_GITMODULES_IN_WT (1<<2) > +#define SUBMODULE_CHECK_GITLINKS_IN_TREE (1<<3) > +int has_submodules(unsigned what_to_check); -- Brandon Williams

Re: [PATCH 2/2] clone: remember references for submodules even when not recursing

2017-04-20 Thread Brandon Williams
idea is to keep the references around even if the user doesn't want to recurse immediately? -- Brandon Williams

Re: [PATCH v3 03/18] grep: submodule-related case statements should die if new fields are added

2017-04-20 Thread Brandon Williams
ttern != NULL; > @@ -515,6 +517,8 @@ static void compile_submodule_options(const struct > grep_opt *opt, > case GREP_PATTERN_BODY: > case GREP_PATTERN_HEAD: > break; > + default: > + die("BUG: Added a new grep token type without updating > case statement"); > } > } > > -- > 2.11.0 > -- Brandon Williams

Re: [PATCH v3 01/18] grep: amend submodule recursion test in preparation for rx engine testing

2017-04-20 Thread Brandon Williams
17-04-07). The pattern "(.|.)[\d]" will match this content > differently under fixed/basic/extended & perl. > > Signed-off-by: Ævar Arnfjörð Bjarmason Looks good. -- Brandon Williams

Re: [PATCH 1/2] submodule.c: add has_submodules to check if we have any submodules

2017-04-20 Thread Brandon Williams
On 04/20, Stefan Beller wrote: > On Thu, Apr 20, 2017 at 3:07 PM, Brandon Williams wrote: > > On 04/11, Stefan Beller wrote: > >> +int has_submodules(unsigned what_to_check) > >> +{ > >> + if (what_to_check & SUBMODULE_CHECK_ANY_CONFIG) { > &g

Re: What's cooking in git.git (Apr 2017, #04; Wed, 19)

2017-04-20 Thread Brandon Williams
On 04/20, Brandon Williams wrote: > On 04/20, Johannes Schindelin wrote: > > Hi Lars & Junio, > > > > On Thu, 20 Apr 2017, Lars Schneider wrote: > > > > > > * bw/forking-and-threading (2017-04-19) 11 commits > > > > - run-command: block sig

Re: [PATCH 00/53] object_id part 8

2017-04-24 Thread Brandon Williams
ble (hopefully it won't require many iterations). -- Brandon Williams

Re: [PATCH v2] completion: optionally disable checkout DWIM

2017-04-24 Thread Brandon Williams
mote's name e.g. 'origin/' kind of like vanilla directory completion. This way, unless I'm actually interested in the remote, I don't see the thousands of branches related to it. -- Brandon Williams

Re: [PATCH 0/2] perf: show that wildmatch() regressed for pathological cases in v2.0

2017-04-24 Thread Brandon Williams
bbing over the network, e.g. in some future upload-pack protocol. > > There are probably some web-based programs built on top of git that > are vulnerable to DoS attacks as a result of this, e.g. if they take > user-supplied globs and feed them to ls-files. I was taking a look at wildmatch a few months ago and have an unfinished patch to do some cleanup there. I noticed this was inefficient but didn't expect those kinds of numbers. I wonder how difficult it would be to rewrite it so that we don't have this issue. -- Brandon Williams

Re: [PATCH v6 00/11] forking and threading

2017-04-24 Thread Brandon Williams
On 04/19, Brandon Williams wrote: > Changes in v6: > * fix some windows compat issues > * better comment on the string_list_remove function (also marked extern) > > Brandon Williams (10): > t5550: use write_script to generate post-update hook > t0061: run_command execu

[PATCH v6 12/11] run-command: don't try to execute directories

2017-04-24 Thread Brandon Williams
ories. Instead use 'stat()' and check that the path is to a regular file. Now run-command won't try to execute the directory 'git-remote-blah': $ git ls-remote blah://blah fatal: Unable to find remote helper for 'blah' Signed-off-by: Brandon

[PATCH v7 1/2] exec_cmd: expose is_executable function

2017-04-25 Thread Brandon Williams
Move the logic for 'is_executable()' from help.c to exec_cmd.c and expose it so that callers from outside help.c can access the function. This is to enable run-command to be able to query if a file is executable in a future patch. Signed-off-by: Brandon Williams --- exec_

[PATCH v7 2/2] run-command: don't try to execute directories

2017-04-25 Thread Brandon Williams
ory or non-executable file 'git-hello': $ git hello Hello World! Reported-by: Brian Hatfield Signed-off-by: Brandon Williams --- run-command.c | 2 +- t/t0061-run-command.sh | 23 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff -

Re: [PATCH v7 1/2] exec_cmd: expose is_executable function

2017-04-25 Thread Brandon Williams
On 04/25, Johannes Sixt wrote: > Am 25.04.2017 um 19:54 schrieb Brandon Williams: > >Move the logic for 'is_executable()' from help.c to exec_cmd.c and > >expose it so that callers from outside help.c can access the function. > > The function is quite low-level. I

Re: [PATCH v7 2/2] run-command: don't try to execute directories

2017-04-25 Thread Brandon Williams
On 04/25, Jonathan Nieder wrote: > Brandon Williams wrote: > > > Subject: run-command: don't try to execute directories > > nit: this is also about non-executable files, now. That would mean > something like > > run-command: don't try to execute direct

[PATCH v8 1/2] run-command: expose is_executable function

2017-04-25 Thread Brandon Williams
Move the logic for 'is_executable()' from help.c to run_command.c and expose it so that callers from outside help.c can access the function. This is to enable run-command to be able to query if a file is executable in a future patch. Signed-off-by: Brandon Williams --- help.c

[PATCH v8 2/2] run-command: restrict PATH search to executable files

2017-04-25 Thread Brandon Williams
ory or non-executable file 'git-hello': $ git hello Hello World! Reported-by: Brian Hatfield Signed-off-by: Brandon Williams --- run-command.c | 19 ++- t/t0061-run-command.sh | 30 ++ 2 files changed, 48 insertions(+

[PATCH v9 2/2] run-command: restrict PATH search to executable files

2017-04-26 Thread Brandon Williams
ctory or non-executable file 'git-hello': $ git hello Hello World! This matches what 'execvp()' would have done with a request to execute 'git-hello' with such a $PATH. Reported-by: Brian Hatfield Signed-off-by: Brandon Williams --- This [2/2] patch h

Re: BUG: wildmatches like foo/**/**/bar don't match properly due to internal optimizations

2017-04-26 Thread Brandon Williams
operate on the submodule unless the first part of the pattern matches the submodule. Right now with recursive grep, if wildcards are used then the code just punts and says "yeah this pattern may match something in the submodule but we won't know for sure till we actually try". -- Brandon Williams

Re: [PATCH v3 4/5] clone: add a --no-tags-submodules to pass --no-tags to submodules

2017-04-27 Thread Brandon Williams
On 04/26, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > > > From: Brandon Williams > > > > Add a --no-tags-submodules which does for --no-tags what the existing > > --shallow-submodules does for --depth, i.e. doing: > > > > git clon

Re: [PATCH v3 2/5] clone: add a --no-tags option to clone without tags

2017-04-27 Thread Brandon Williams
then you can negate it to --no-tags, without having to worry > about the no-no case. Yeah I agree that a "--tags" option would make the ui cleaner. -- Brandon Williams

Re: [PATCH v3 3/5] tests: rename a test having to do with shallow submodules

2017-04-27 Thread Brandon Williams
ubmodules.sh > > rename to t/t5614-clone-submodules-shallow.sh > > Thanks for formatting the patches with rename detection. :) > The rename looks good. Do you have to turn that on or is that on by default? -- Brandon Williams

Re: [PATCH v3 4/5] clone: add a --no-tags-submodules to pass --no-tags to submodules

2017-04-27 Thread Brandon Williams
On 04/27, Stefan Beller wrote: > On Wed, Apr 26, 2017 at 4:12 PM, Ævar Arnfjörð Bjarmason > wrote: > > From: Brandon Williams > > > > Add a --no-tags-submodules which does for --no-tags what the existing > > --shallow-submodules does for --depth, i.e. doing: &

Re: [PATCH v3 0/5] clone: --no-tags option

2017-04-27 Thread Brandon Williams
because it makes the UX a little bit easier to work with (I don't have to remember all the fancy --OPT-submodules stuff, only --recurse-submodules). That is unless you have some good rational that I'm not considering (completely possible :D). > > Brandon Williams (1): > clone:

[PATCH 4/6] submodule: change string_list changed_submodule_paths

2017-04-28 Thread Brandon Williams
Eliminate a call to 'xstrdup()' by changing the string_list 'changed_submodule_paths' to duplicated strings added to it. Signed-off-by: Brandon Williams --- submodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodule.c b/submodule.c index

[PATCH 5/6] submodule: improve submodule_has_commits

2017-04-28 Thread Brandon Williams
Teach 'submodule_has_commits()' to ensure that if a commit exists in a submodule, that it is also reachable from a ref. This is a prepritory step prior to merging the logic which checkes for changed submodules when fetching or pushing. Signed-off-by: Brandon Williams --- submod

[PATCH 2/6] submodule: rename free_submodules_sha1s

2017-04-28 Thread Brandon Williams
Rename 'free_submodules_sha1s()' to 'free_submodules_oids()' since the function frees a 'struct string_list' which has a 'struct oid_array' stored in the 'util' field. Signed-off-by: Brandon Williams --- submodule.c | 5 +++-- 1 file chan

[PATCH 0/6] changed submodules

2017-04-28 Thread Brandon Williams
performing almost identical tasks, without sharing any code. This series is meant as a cleanup to submodule.c in order to unify these two code paths as well as make it easier for future callers to be able to query for submodules which have chagned across a number of commits. Brandon Williams (6

[PATCH 6/6] submodule: refactor logic to determine changed submodules

2017-04-28 Thread Brandon Williams
walk. Signed-off-by: Brandon Williams --- submodule.c | 247 ++-- 1 file changed, 105 insertions(+), 142 deletions(-) diff --git a/submodule.c b/submodule.c index 100d31d39..88093779e 100644 --- a/submodule.c +++ b/submodule.c @@ -617,6 +6

[PATCH 3/6] submodule: remove add_oid_to_argv

2017-04-28 Thread Brandon Williams
The function 'add_oid_to_argv()' provides the same functionality as 'append_oid_to_argv()'. Remove this duplicate function and instead use 'append_oid_to_argv()' where 'add_oid_to_argv()' was previously used. Signed-off-by: Brandon Williams --- submod

<    6   7   8   9   10   11   12   13   14   15   >