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
_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
eptable to complain and do nothing/ignore it, in the future we may
want to actually clone and then check it out.
--
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
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);
> > +
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
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.*)
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
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
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
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
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
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
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
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
.
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
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
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
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
@@
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
---
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
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
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
>
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;
>
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++) {
> +
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
---
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
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
@@
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
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
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
.
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
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
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
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
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
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
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
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
---
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.
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
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
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
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
@@
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
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
.
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
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
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
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
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;
>
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
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
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
---
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
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
@@
.
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
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
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
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
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.
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
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
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
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
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
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.
> >
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:
> >
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
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
> 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
idea is to keep the references around even if the user doesn't
want to recurse immediately?
--
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
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
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
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
ble (hopefully it won't require many
iterations).
--
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
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
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
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
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_
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 -
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
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
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
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(+
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
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
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
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
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
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:
&
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:
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
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
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
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
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
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
1001 - 1100 of 2393 matches
Mail list logo