On 03/22, Jonathan Nieder wrote:
I agree with most of these changes, I'll make them locally and send out
a reroll.
> Brandon Williams wrote:
>
> > --- a/builtin/send-pack.c
> > +++ b/builtin/send-pack.c
> > @@ -152,6 +152,7 @@ int cmd_send_pack(int argc, const char
nathan Nieder <jrnie...@gmail.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
send-pack.c | 20
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/send-pack.c b/send-pack.c
index d2d2a49a0..66e652f7e 100644
--- a/send-pack.c
+++ b/send
On 03/22, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > Teach remote-curl to understand push options and to be able to convey
> > them across HTTP.
> >
> > Signed-off-by: Brandon Williams <bmw...@google.com>
> > ---
&g
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/grep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 9304c33e7..4694e68f3 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -979,7 +979,7 @@ int cmd_grep(int argc,
process.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
cache.h | 1 +
git.c | 2 --
setup.c | 7 ++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cache.h b/cache.h
index 8c0e64420..7d253a078 100644
--- a/cache.h
+++ b/cache.h
@@ -410,6 +410,7 @@ static inlin
child process can correctly
interpret the pathspecs provided by the user as well as being able to
properly format its output relative to the directory the user invoked
the original command from.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/grep.c
child process can correctly interpret
the pathspecs provided by the user as well as being able to properly format its
output relative to the directory the user invoked the original command from.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/ls-files.c | 25 +
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/ls-files.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/builtin/ls-files.c b/builtin/ls-files.c
index 1c0f057d0..ca5b48db0 100644
--- a/builtin/ls-files.c
+++ b/builtin/ls-files.c
@@
Changes in v3:
* Added sign-off to the patches where it was missing.
* slight tweak to the style and commit msgs of a few patches.
* broke up the last patch (for ls-files) into a typo fix followed by fixing the
bug itself. This was to make the diff easier to review.
Brandon Williams (5
On 03/17, Stefan Beller wrote:
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams <bmw...@google.com> wrote:
> > Teach clone --recurse-submodules to optionally take a pathspec argument
> > which describes which submodules should be recursively initialized and
> &
On 03/17, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > ... I was being cautious with this patch since git didn't currently
> > read GIT_PREFIX.
>
> Ahh, I forgot about that. Processes we spawn do expect GIT_PREFIX
> to
On 03/17, Stefan Beller wrote:
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams <bmw...@google.com> wrote:
> > When initializing a submodule set the submodule..active config to
> > true if the module hasn't already been configured to be active by some
> > other
the
output function stored in the output field of the "struct grep_opt"
object directly, making it behave similarly to both grep_file() and
grep_sha1().
Reported-by: Rahul Bedarkar <rahul.bedar...@imgtec.com>
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/g
On 03/17, Stefan Beller wrote:
> On Fri, Mar 17, 2017 at 12:08 PM, Brandon Williams <bmw...@google.com> wrote:
> > On 03/17, Stefan Beller wrote:
> >> > prefix = setup_git_directory_gently_1(nongit_ok);
> >> > + env_prefix =
t follow, this doesn't have anything to do with super-prefix.
>
> ok, sounds reasonable to me; though I do not use this feature,
> so my judgement is not as good.
>
> Do we need a test for this behavior?
>
> Thanks,
> Stefan
--
Brandon Williams
Signed-off-by: Brandon Williams <bmw...@google.com>
---
grep.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/grep.c b/grep.c
index 0dbdc1d00..56ef0ecbf 100644
--- a/grep.c
+++ b/grep.c
@@ -12,6 +12,11 @@ static int grep_source_is_binary(struct grep_sour
(Wstat: 256 Tests: 10 Failed:
1)
Failed test: 10
Non-zero exit status: 1
I didn't take a close look at it but this would seem to indicate that we
don't worry to much about systems without pthreads support. Just food
for thought.
--
Brandon Williams
On 03/17, Jeff King wrote:
> On Fri, Mar 17, 2017 at 03:42:32PM -0700, Brandon Williams wrote:
>
> > > > I didn't take a close look at it but this would seem to indicate that we
> > > > don't worry to much about systems without pthreads support. Just food
> &g
Sync does some work determining what URLs should be used for a submodule
but then throws this work away if the submodule isn't active. Instead
perform the activity check earlier and skip inactive submodule in order
to avoid doing unnecessary work.
Signed-off-by: Brandon Williams <
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 136e26a2c..ab233712d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1010,14 +1010,13 @@ cmd_
Changes in v5:
* Add "NEEDSWORK" comments to indicate where attention is needed once
per-worktree config is a reality
* --no-recurse now works by clearing the string list of paths.
* module_list_active() now does post-processing instead of duplicating code.
Brandon Wi
On 03/17, Stefan Beller wrote:
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams <bmw...@google.com> wrote:
> > Teach `submodule init` to initialize submodules which have been
> > configured to be active by setting 'submodule.active' with a pathspec.
> >
> > N
'--recurse-submodules' to mean
recursing into submodules, so advertise this spelling here as the
genuine option.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/git-clone.txt | 14 ++
builtin/clone.c | 50 -
t/t7400-su
When initializing a submodule set the submodule..active config to
true if the module hasn't already been configured to be active by some
other means (e.g. a pathspec set in submodule.active).
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c | 12 +
Use the 'is_submodule_initialized()' helper to check for configured
submodules instead of manually checking for the submodule's URL in the
config.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c | 15 +++
1 file changed, 3 insertions(
ut
> they don't have a child_process struct, and the cleanup
> function ends up dereferencing NULL.
>
> We should notice this case and assume that the processes do
> not need to be waited for (i.e., the same behavior they had
> before 46df6906f).
>
> Reporte
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 577136148..db94dea3b 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1089,14 +1089,14 @@ cm
On 03/17, Jeff King wrote:
> On Fri, Mar 17, 2017 at 11:47:01AM -0700, Brandon Williams wrote:
>
> > While taking a look at this bug I discovered that the test suite doesn't
> > pass 100% of the test when compiled with the NO_PTHREADS option. The
> > following
owed by the pathspec check against submodule.active.
To ensure backwards compatibility, if neither of these options are set,
git falls back to checking the submodule..url option to determine
if a submodule is interesting.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documenta
of the configuration variable in scripts.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c| 11 +++
t/t7413-submodule-is-active.sh | 31 +++
2 files changed, 42 insertions(+)
create mode 100755 t/t7413-submodule-is-activ
. If no path arguments are given and 'submodule.active' is not
configured, then `init` will retain the old behavior of initializing all
submodules.
This allows users to record more complex patterns as it saves retyping
them whenever you invoke update.
Signed-off-by: Brandon Williams <bmw...@google.
In addition to adding submodule..url to the config, set
submodule..active to true unless submodule.active is configured
and the submodule's path matches the configured pathspec.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 14 ++
t
On 03/17, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > I don't think that prefix can ever have ".." in it. From what I
> > understand it is always a path from the root of the repository to the
> > cwd that the git command wa
item->string);
> }
>
> - parse_pathspec(, 0, 0, 0, args.argv);
> + parse_pathspec(, 0, 0, NULL, args.argv);
> ret = match_pathspec(, path, strlen(path), 0, NULL, 1);
>
> argv_array_clear();
> --
> 2.12.0
--
Brandon Williams
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > + if git config --get submodule.active >/dev/null
> > + then
> > + # If the submodule being adding isn't already covered by the
> > + # current c
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > When initializing a submodule set the submodule..active config to
> > true to indicate that the submodule is active.
> >
> > Signed-off-by: Brandon Williams <bmw...@goog
child process can correctly
interpret the pathspecs provided by the user as well as being able to
properly format its output relative to the directory the user invoked
the original command from.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/grep.c
child process can correctly interpret
the pathspecs provided by the user as well as being able to properly format its
output relative to the directory the user invoked the original command from.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/ls-files.c
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > changes in v3:
> >
> > * Droped a patch which tried to use a more accurate URL for deinit. It
> > didn't
> > really fit inside the scope of this series. It may
In a future patch child processes which act on submodules need a little
more context about the original command that was invoked. This patch
teaches git to use the prefix stored in `GIT_INTERNAL_TOPLEVEL_PREFIX`
if another prefix wasn't found during the git directory setup process.
---
cache.h
as correctly
formatting their output with relative paths.
In order to pass the prefix to a child I made a new env var since the existing
GIT_PREFIX isn't respected. I'm not sure this is the best method so I'm open
to ideas on the best way to convey this information to a child process.
Brandon
---
builtin/grep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 9304c33e7..4694e68f3 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -979,7 +979,7 @@ int cmd_grep(int argc, const char **argv, const char
*prefix)
On 03/14, Stefan Beller wrote:
> On Tue, Mar 14, 2017 at 3:11 PM, Brandon Williams <bmw...@google.com> wrote:
> > When using the --recurse-submodules flag with a relative pathspec which
> > includes "..", an error is produced inside the child process spawned for
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > The new switch passes the pathspec to `git submodule update
> > --init-active` which is called after the actual clone is done.
> >
> > Additionally this configures the submodu
.len);
> >
> > - grep_source_clear();
> > - strbuf_release();
> > + grep_source_clear();
> > + strbuf_release();
> > return hit;
> > }
> > }
Thanks for pointing out the bug (there seem to just be more and more in
this grep code...but what else can you expect from my first
contribution! :D) but I think it would be better to make the way the
recursive code output's more consistent with the way the rest of the
grep handles output. That way we can get rid of some of the special
casing that I had done here.
I'll send out what I have locally in just a second.
--
Brandon Williams
environment, but instead setting the same value
> to GIT_PREFIX and we should get the same behaviour, no?
>
Very true, potentially we could just use GIT_PREFIX instead of
introducing a brand new env var (which is essentially just the same
thing). I was being cautious with this patch since git didn't currently
read GIT_PREFIX. I was hoping other with more knowledge in this area
would voice their opinions and lead me in the right direction ;)
--
Brandon Williams
e code
> could be done in a month), the gsoc student can always convert more
> config to the new way.
If in the future we did want better support for making user defaults
(apart from aliases) for commands we could entertain creating a command
like bash's 'command' which ignores any user defaults and executes a
particular command in a vanilla mode.
So if the user configured 'git am' to always use the -3 option then
running `git command am` (or something akin to that) would just run the
vanilla 'am' command with no options. Probably not the best idea since
tooling would need to become aware of such a paradigm change, but its
just a thought.
--
Brandon Williams
t; > "JavaScript".
>
> Yeah thanks, and while at it, the "v2" in the subject should be inside
> the square brackets around "PATCH".
You can use the --reroll-count option to format-patch to have format
patch place the v inside the bracketed PATCH section.
--
Brandon Williams
On 03/16, Junio C Hamano wrote:
> Stefan Beller <sbel...@google.com> writes:
>
> > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams <bmw...@google.com> wrote:
> >> Sync does some work determining what URLs should be used for a submodule
> >> but then th
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documentation/git-clone.txt | 14 ++
builtin/clone.c | 47 ++-
t/t7400-submodule-basic.sh | 68 +
3 files changed, 117 insertions(+), 12 deletion
. If no path arguments are given and 'submodule.active' is not
configured, then `init` will retain the old behavior of initializing all
submodules.
This allows users to record more complex patterns as it saves retyping
them whenever you invoke update.
Signed-off-by: Brandon Williams <bmw...@google.
Use the 'is_submodule_initialized()' helper to check for configured
submodules instead of manually checking for the submodule's URL in the
config.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c | 15 +++
1 file changed, 3 insertions(
command line options resulting in what I think is less cluttered UI from
the last version. See patch 7 and 8 for more detail.
* Fixed an incorrect parameter type in patch 6 (thanks Ramsay).
Brandon Williams (10):
submodule--helper: add is-active subcommand
submodule status: use
In addition to adding submodule..url to the config, set
submodule..active to true unless submodule.active is configured
and the submodule's path matches the configured pathspec.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 12
t
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 136e26a2c..ab233712d 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1010,14 +1010,13 @@ cmd_
Signed-off-by: Brandon Williams <bmw...@google.com>
---
git-submodule.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 577136148..db94dea3b 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -1089,14 +1089,14 @@ cm
owed by the pathspec check against submodule.active.
To ensure backwards compatibility, if neither of these options are set,
git falls back to checking the submodule..url option to determine
if a submodule is interesting.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
Documenta
Sync does some work determining what URLs should be used for a submodule
but then throws this work away if the submodule isn't active. Instead
perform the activity check earlier and skip inactive submodule in order
to avoid doing unnecessary work.
Signed-off-by: Brandon Williams <
When initializing a submodule set the submodule..active config to
true if the module hasn't already been configured to be active by some
other means (e.g. a pathspec set in submodule.active).
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c | 7
of the configuration variable in scripts.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
builtin/submodule--helper.c| 11 +++
t/t7413-submodule-is-active.sh | 31 +++
2 files changed, 42 insertions(+)
create mode 100755 t/t7413-submodule-is-activ
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > Currently the submodule..url config option is used to determine
> > if a given submodule exists and is interesting to the user. This
> > however doesn't work very well beca
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > +static void module_list_active(struct module_list *list)
> > +{
> > + int i;
> > +
> > + if (read_cache() < 0)
> > + die(_(&quo
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > +--init-active::
> > + This option is only valid for the update command.
> > + Initialize all submodules configured in "`submodule.active`"
> > + that have not
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > Signed-off-by: Brandon Williams <bmw...@google.com>
> > ---
> > git-submodule.sh | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff
reordered the patches, such that
>-> the first two patches are Valerys series and could go on its own as
> a cleanup
>-> added a new patch "submodule.c: get_super_prefix_or_empty" to
> have cleaner code.
> * split up the error conditions in the test lib for rea
On 03/14, Johannes Schindelin wrote:
> Hi Brandon,
>
> On Tue, 14 Mar 2017, Brandon Williams wrote:
>
> > In a future patch child processes which act on submodules need a little
> > more context about the original command that was invoked. This patch
> > teache
implementation
> detail to do so is by using a new is_active() function, so the patch
> title needs a bit of tweaking, too.
>
> Subject: submodule--helper: add is-active subcommand
Thanks for helping wordsmith this. Since starting to contribute I've
realized that writing a good commit message is probably the hardest
part of the whole process.
--
Brandon Williams
On 03/14, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > Signed-off-by: Brandon Williams <bmw...@google.com>
> > ---
> > git-submodule.sh | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff
On 03/14, Brandon Williams wrote:
> On 03/14, Junio C Hamano wrote:
> > Brandon Williams <bmw...@google.com> writes:
> >
> > > Signed-off-by: Brandon Williams <bmw...@google.com>
> > > ---
> > > git-submodule.sh | 3 +--
> > > 1 file
On 03/14, Stefan Beller wrote:
> On Tue, Mar 14, 2017 at 11:06 AM, Junio C Hamano <gits...@pobox.com> wrote:
> > Brandon Williams <bmw...@google.com> writes:
> >
> >> - /*
> >> - * Looking up the url in .git/config.
> >> -
On 03/14, Stefan Beller wrote:
> On Tue, Mar 14, 2017 at 3:10 PM, Brandon Williams <bmw...@google.com> wrote:
>
> Missing SoB here, too.
I guess I'm having an off day...Will fix.
>
> > ---
> > builtin/grep.c | 2 +-
> > 1 file changed, 1 insertion(
tion
> better than what I had back then.
>
> On Mon, Mar 13, 2017 at 2:43 PM, Brandon Williams <bmw...@google.com> wrote:
> > Currently the submodule..url config option is used to determine
> > if a given submodule exists and is interesting to the user. This
>
On 03/16, Stefan Beller wrote:
> On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams <bmw...@google.com> wrote:
> > Sync does some work determining what URLs should be used for a submodule
> > but then throws this work away if the submodule isn't active. Instead
> >
On 04/05, Johannes Schindelin wrote:
> Hi Brandon,
>
> On Tue, 4 Apr 2017, Brandon Williams wrote:
>
> > I'm all for seeing a patch like this applied. I agree that we can't
> > expect the world to be running the most up-to-date version of curl but
> > we should
t cmd_grep(int argc, const char **argv, const char
> *prefix)
> hit |= wait_all();
> if (hit && show_in_pager)
> run_pager(, prefix);
> + clear_pathspec();
> free_grep_patterns();
> return !hit;
> }
> --
> 2.11.0
>
--
Brandon Williams
In order to avoid allocation between 'fork()' and 'exec()' prepare the
environment to be used in the child process prior to forking.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
run-command.c | 84 ---
1 file chang
', will be used.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
cache.h | 3 +--
exec_cmd.c| 2 +-
run-command.c | 15 ++-
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/cache.h b/cache.h
index 5c8078291..10d40ecae 100644
--- a/cache.h
+++ b/c
In order to avoid allocation between 'fork()' and 'exec()' open the
stream used for the child's error handeling prior to forking.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
run-command.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git
in a locked state in the resulting process with no
hope of it ever being released.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
run-command.c | 8
1 file changed, 8 insertions(+)
diff --git a/run-command.c b/run-command.c
index 84c63b209..2b3249de4 100644
--- a/run-com
In order to avoid allocation between 'fork()' and 'exec()' the argv
array used in the exec call is prepared prior to forking the process.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
run-command.c | 34 --
1 file changed, 16 insertions(+), 18 del
grep --recurse-submodules', and the standard
builds against glibc shouldn't exhibit any of this deadlocking.
Brandon Williams (5):
run-command: convert sane_execvp to sane_execvpe
run-command: prepare argv before forking
run-command: allocate child_err before forking
run-command: prepare
st use execv(e) since it shouldn't have any calls to malloc in them
correct?
--
Brandon Williams
On 04/11, Junio C Hamano wrote:
> Brandon Williams <bmw...@google.com> writes:
>
> > v3 builds upon v2 by adding 3 additional patches to add functionality to
> > also
> > propagate the remote and refspec down to children process's working to push
> > submodule
On 04/11, Eric Wong wrote:
> Brandon Williams <bmw...@google.com> wrote:
> > On 04/11, Eric Wong wrote:
> > > Hi Brandon, this series tickles an old itch of mine, so I
> > > started working off of it. I'm only somewhat concerned
> > > with the path re
think the
> ruby-core developers (myself included) have fixed all the
> problems with it; even in multi-threaded code which calls malloc.
--
Brandon Williams
On 04/10, Jonathan Nieder wrote:
> Brandon Williams wrote:
>
> > In order to avoid allocation between 'fork()' and 'exec()' prepare the
> > environment to be used in the child process prior to forking.
>
> If using something like posix_spawn(), this would be needed
changing
the enum name.
>From [12/12] it looks like the main purpose of this series is to use a
more preferment version of PCRE, if all else is equal it doesn't really
make much sense to have both versions to be select-able at runtime. Is
there any benefit of being able to do that, that I'm missing?
--
Brandon Williams
On 04/11, Jonathan Nieder wrote:
> Brandon Williams wrote:
> Jonathan Tan had an idea about how to side-step the issue: what if
> "grep" forks an appropriate set of child processes before creating any
> threads and then communicates with those children using pipes?
> Bec
it reset --hard &&
> +
> + echo base >root.c &&
> + git add "*.c" &&
> + git commit -m base &&
> +
> + echo change >root.c &&
> + mkdir -p subdir &&
> + git -C subdir add -p "../root.c" <<-\EOF &&
> + y
> + EOF
> +
> + cat >expect <<-\EOF &&
> + root.c
> + EOF
> + git diff --cached --name-only >actual &&
> + test_cmp expect actual
> +'
> +
> test_expect_success 'add -p does not expand argument lists' '
> git reset --hard &&
>
> --
> 2.12.2
>
--
Brandon Williams
with at least the string
> ":(prefix:0)" and thus avoid the warning.
>
> Signed-off-by: Patrick Steinhardt <p...@pks.im>
> ---
>
> This is the second version of [1]. It fixes a bug catched by
> Brandon when the pathspec is resolved to the empty string and
> improves the test a bit to actually catch this issue.
This version looks good to me. Thanks for fixing that small issue!
--
Brandon Williams
plied. I agree that we can't
expect the world to be running the most up-to-date version of curl but
we should be able to select some "oldest" version we will support which
can be bumped up every couple of years.
I mean, ensuring that you are running with an up-to-date version of curl
is really important when it comes to all of the security fixes that have
been made in each revision.
--
Brandon Williams
On 03/31, Jonathan Nieder wrote:
> Hi,
>
> Brandon Williams wrote:
>
> > Teach push --recurse-submodules to propagate push-options recursively to
> > the pushes performed in the submodules.
>
> Sounds like a good change.
>
> [...]
> > +++ b/submodule
Teach push --recurse-submodules to propagate push-options recursively to
the pushes performed in the submodules.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
submodule.c | 13 +++--
submodule.h | 1 +
t/t5545-push-options.s
There isn't any obvious reason for the 'struct string_list push_options'
and 'struct string_list_item *item' to be marked as static, so unmark
them as being static. Also, clear the push_options string_list to
prevent memory leaking.
Signed-off-by: Brandon Williams <bmw...@google.
v2 addresses Jonathan's comments as well as adds an additional patch to unmark
a local variable as static.
Brandon Williams (2):
push: unmark a local variable as static
push: propagate push-options with --recurse-submodules
builtin/push.c | 5 +++--
submodule.c | 13
Teach push --recurse-submodules to propagate push-options recursively to
the pushes performed in the submodules.
Signed-off-by: Brandon Williams <bmw...@google.com>
---
submodule.c | 14 +++---
submodule.h | 3 ++-
t/t5545-push-options.s
On 03/31, Jonathan Nieder wrote:
> Brandon Williams wrote:
>
> > Also, clear the push_options string_list to
> > prevent memory leaking.
>
> That's not a real leak, right? Is the motivation to make it not show up
> in valgrind output?
well d
On 04/10, Brandon Williams wrote:
> Convert 'sane_execvp()' to 'sane_execvpe()' which optionally takes a
> pointer to an array of 'char *' which should be used as the environment
> for the process being exec'd. If no environment is provided (by passing
> NULL instead) then the alre
t;sub/file &&
> + git -C sub add file &&
> + git -C sub commit -m "add file" &&
> +
> + git init parent &&
> + mkdir parent/src &&
> + echo "foobar" >parent/src/file &&
> + git -C parent add src/file &&
> + git -C parent submodule add ../sub src/sub &&
> + git -C parent submodule add ../sub sub &&
> + git -C parent commit -m "add files and submodules" &&
> +
> + # Verify grep from root works
> + cat >expect <<-\EOF &&
> + .gitmodules
> + src/file
> + src/sub/file
> + sub/file
> + EOF
> + git -C parent ls-files --recurse-submodules >actual &&
> + test_cmp expect actual &&
> +
> + # Verify grep from a subdir works
> + cat >expect <<-\EOF &&
> + file
> + sub/file
> + EOF
> + git -C parent/src ls-files --recurse-submodules >actual &&
> + test_cmp expect actual
> +'
> +
> +test_incompatible_with_recurse_submodules ()
> +{
> + test_expect_success "--recurse-submodules and $1 are incompatible" "
> + test_must_fail git ls-files --recurse-submodules $1 2>actual &&
> + test_i18ngrep -- '--recurse-submodules unsupported mode' actual
> + "
> +}
> +
> +test_incompatible_with_recurse_submodules --deleted
> +test_incompatible_with_recurse_submodules --others
> +test_incompatible_with_recurse_submodules --unmerged
> +test_incompatible_with_recurse_submodules --killed
> +test_incompatible_with_recurse_submodules --modified
> +
> +test_done
> --
> 2.12.2.776.gded3dc243c29.dirty
>
--
Brandon Williams
On 04/05, Jacob Keller wrote:
> On Fri, Mar 31, 2017 at 5:19 PM, Jonathan Nieder <jrnie...@gmail.com> wrote:
> > Brandon Williams wrote:
> >
> >> Teach push --recurse-submodules to propagate push-options recursively to
> >> the pushes performed in the submodu
601 - 700 of 2388 matches
Mail list logo