Re: [GSoC][PATCH/RFC v3 3/3] credential-cache: only use user_socket if a socket

2017-03-14 Thread Brandon Williams
y after you've done this should you send your > > patches to the mailing list. > > Thanks for the advice. I will be more careful in the future. Of course! And no worries, I just wanted you to be aware of the conventions so that you have an easier time contributing :) -- Brandon Williams

Re: [PATCH] add--interactive: do not expand pathspecs with ls-files

2017-03-14 Thread Brandon Williams
+ git reset --hard && > + > + echo content >not-changed && > + git add not-changed && > + git commit -m "add not-changed file" && > + > + echo change >file && > + GIT_TRACE=$(pwd)/trace.out git add -p . <<-\EOF && > + y > + EOF > + > + # we know that "file" must be mentioned since we actually > + # update it, but we want to be sure that our "." pathspec > + # was not expanded into the argument list of any command. > + # So look only for "not-changed". > + ! grep not-changed trace.out > +' > + > test_done Tests look sane to me. -- Brandon Williams

[PATCH v2 3/4] grep: fix bug when recursing with relative pathspec

2017-03-14 Thread Brandon Williams
ieces of information a 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 --- builtin/gre

[PATCH v2 4/4] ls-files: fix bug when recursing with relative pathspec

2017-03-14 Thread Brandon Williams
ieces of information a 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 --- builtin/ls-files.c

[PATCH v2 2/4] setup: allow for prefix to be passed to git commands

2017-03-14 Thread Brandon Williams
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 |

[PATCH v2 0/4] recursing submodules with relative pathspec (grep and ls-files)

2017-03-14 Thread Brandon Williams
hing as well 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 informatio

[PATCH v2 1/4] grep: fix help text typo

2017-03-14 Thread Brandon Williams
--- 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) OPT_

Re: [PATCH v3 00/10] decoupling a submodule's existence and its url

2017-03-14 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams 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 be something w

Re: [PATCH v2 2/4] setup: allow for prefix to be passed to git commands

2017-03-14 Thread Brandon Williams
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 > > teaches g

Re: [PATCH v3 01/10] submodule--helper: add is_active command

2017-03-14 Thread Brandon Williams
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

Re: [PATCH v3 02/10] submodule status: use submodule--helper is-active

2017-03-14 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams writes: > > > Signed-off-by: Brandon Williams > > --- > > git-submodule.sh | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/git-submodule.sh b/git-submodule.sh > >

Re: [PATCH v3 02/10] submodule status: use submodule--helper is-active

2017-03-14 Thread Brandon Williams
On 03/14, Brandon Williams wrote: > On 03/14, Junio C Hamano wrote: > > Brandon Williams writes: > > > > > Signed-off-by: Brandon Williams > > > --- > > > git-submodule.sh | 3 +-- > > > 1 file changed, 1 insertion(+), 2 deletions(-) > >

Re: [PATCH v3 03/10] submodule sync: use submodule--helper is-active

2017-03-14 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams writes: > > > Signed-off-by: Brandon Williams > > --- > > git-submodule.sh | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/git-submodule.sh b/git-submodule.sh > >

Re: [PATCH v3 04/10] submodule--helper clone: check for configured submodules using helper

2017-03-14 Thread Brandon Williams
On 03/14, Stefan Beller wrote: > On Tue, Mar 14, 2017 at 11:06 AM, Junio C Hamano wrote: > > Brandon Williams writes: > > > >> - /* > >> - * Looking up the url in .git/config. > >> - * We must not fall back to .gitmodules as we onl

Re: [PATCH v2 1/4] grep: fix help text typo

2017-03-14 Thread Brandon Williams
On 03/14, Stefan Beller wrote: > On Tue, Mar 14, 2017 at 3:10 PM, Brandon Williams wrote: > > Missing SoB here, too. I guess I'm having an off day...Will fix. > > > --- > > builtin/grep.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCHv9 00/19] Checkout aware of Submodules!

2017-03-14 Thread Brandon Williams
eordered 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 l

Re: [PATCH v2 4/4] ls-files: fix bug when recursing with relative pathspec

2017-03-15 Thread Brandon Williams
On 03/14, Stefan Beller wrote: > On Tue, Mar 14, 2017 at 3:11 PM, Brandon Williams wrote: > > When using the --recurse-submodules flag with a relative pathspec which > > includes "..", an error is produced inside the child process spawned for a > > submodule. When

Re: [PATCH v3 05/10] submodule: decouple url and submodule existence

2017-03-15 Thread Brandon Williams
tion > better than what I had back then. > > On Mon, Mar 13, 2017 at 2:43 PM, Brandon Williams wrote: > > 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 wor

Re: [PATCH v3 05/10] submodule: decouple url and submodule existence

2017-03-15 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams 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 because the URL is a config

Re: [PATCH v3 06/10] submodule update: add `--init-active` switch

2017-03-15 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams writes: > > > +static void module_list_active(struct module_list *list) > > +{ > > + int i; > > + > > + if (read_cache() < 0) > > + die(_("index file corrupt")); > &g

Re: [PATCH v3 06/10] submodule update: add `--init-active` switch

2017-03-15 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams writes: > > > +--init-active:: > > + This option is only valid for the update command. > > + Initialize all submodules configured in "`submodule.active`" > > + that have not been updated before. &

Re: [PATCH v3 10/10] submodule add: respect submodule.active and submodule..active

2017-03-15 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams writes: > > > + if git config --get submodule.active >/dev/null > > + then > > + # If the submodule being adding isn't already covered by the > > + # current configured pat

Re: [PATCH v3 09/10] submodule--helper init: set submodule..active

2017-03-15 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams writes: > > > When initializing a submodule set the submodule..active config to > > true to indicate that the submodule is active. > > > > Signed-off-by: Brandon Williams > > --- > > Hmph. When you do

Re: [PATCH v3 07/10] clone: add --submodule-spec= switch

2017-03-15 Thread Brandon Williams
On 03/14, Junio C Hamano wrote: > Brandon Williams 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 submodule.active option to > &

Re: [PATCH] submodule.c: fix an 'using integer as NULL pointer' warning

2017-03-15 Thread Brandon Williams
} > > - parse_pathspec(&ps, 0, 0, 0, args.argv); > + parse_pathspec(&ps, 0, 0, NULL, args.argv); > ret = match_pathspec(&ps, path, strlen(path), 0, NULL, 1); > > argv_array_clear(&args); > -- > 2.12.0 -- Brandon Williams

Re: [PATCH]v2 adding built-in driver for javascript

2017-03-16 Thread Brandon Williams
ot; 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

[PATCH v4 06/10] submodule: decouple url and submodule interest

2017-03-16 Thread Brandon Williams
has the highest order of precedence followed 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

[PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-16 Thread Brandon Williams
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 ---

[PATCH v4 05/10] submodule--helper clone: check for configured submodules using helper

2017-03-16 Thread Brandon Williams
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 --- builtin/submodule--helper.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-

[PATCH v4 00/10] decoupling url and submodule interest

2017-03-16 Thread Brandon Williams
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

[PATCH v4 02/10] submodule status: use submodule--helper is-active

2017-03-16 Thread Brandon Williams
Signed-off-by: Brandon Williams --- 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_status() do

[PATCH v4 04/10] submodule sync: use submodule--helper is-active

2017-03-16 Thread Brandon Williams
Signed-off-by: Brandon Williams --- 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 @@ cmd_sync() while read

[PATCH v4 08/10] clone: teach --recurse-submodules to optionally take a pathspec

2017-03-16 Thread Brandon Williams
spec. Signed-off-by: Brandon Williams --- Documentation/git-clone.txt | 14 ++ builtin/clone.c | 47 ++- t/t7400-submodule-basic.sh | 68 + 3 files changed, 117 insertions(+), 12 deletions(-) diff --git

[PATCH v4 07/10] submodule init: initialize active submodules

2017-03-16 Thread Brandon Williams
to be active. 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 Wi

[PATCH v4 10/10] submodule add: respect submodule.active and submodule..active

2017-03-16 Thread Brandon Williams
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 --- git-submodule.sh | 12 t/t7413-submodule-is-acti

[PATCH v4 01/10] submodule--helper: add is-active subcommand

2017-03-16 Thread Brandon Williams
ecks of the configuration variable in scripts. Signed-off-by: Brandon Williams --- builtin/submodule--helper.c| 11 +++ t/t7413-submodule-is-active.sh | 31 +++ 2 files changed, 42 insertions(+) create mode 100755 t/t7413-submodule-is-active.sh diff --git a/buil

[PATCH v4 09/10] submodule--helper init: set submodule..active

2017-03-16 Thread 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 --- builtin/submodule--helper.c | 7 +++ t/t7400-subm

Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-16 Thread Brandon Williams
On 03/16, Stefan Beller wrote: > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams 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 > > perform the activ

Re: [PATCH v4 03/10] submodule sync: skip work for inactive submodules

2017-03-17 Thread Brandon Williams
On 03/16, Junio C Hamano wrote: > Stefan Beller writes: > > > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: > >> Sync does some work determining what URLs should be used for a submodule > >> but then throws this work away if the submodule isn'

[PATCH v3 2/5] setup: allow for prefix to be passed to git commands

2017-03-17 Thread Brandon Williams
process. Signed-off-by: Brandon Williams --- 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 inline enum object_type object_type

[PATCH v3 3/5] grep: fix bug when recursing with relative pathspec

2017-03-17 Thread Brandon Williams
ieces of information a 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 --- builtin/gre

[PATCH v3 5/5] ls-files: fix bug when recursing with relative pathspec

2017-03-17 Thread Brandon Williams
ieces of information a 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 --- builtin/ls-files.c

[PATCH v3 4/5] ls-files: fix typo in variable name

2017-03-17 Thread Brandon Williams
Signed-off-by: Brandon Williams --- 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 @@ -30,7 +30,7 @@ static int

[PATCH v3 0/5] recursing submodules with relative pathspec (grep and ls-files)

2017-03-17 Thread Brandon Williams
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

[PATCH v3 1/5] grep: fix help text typo

2017-03-17 Thread Brandon Williams
Signed-off-by: Brandon Williams --- 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

Re: [PATCH] grep: fix build with no thread support

2017-03-17 Thread Brandon Williams
gs); > > > > - write_or_die(1, w.out.buf, w.out.len); > > + write_or_die(1, outbuf.buf, outbuf.len); > > > > - grep_source_clear(&w.source); > > - strbuf_release(&w.out); > > + grep_source_clear(&gs); > > + strbuf_release(&outbuf); > > 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

[PATCH 1/2] grep: set default output method

2017-03-17 Thread Brandon Williams
Signed-off-by: Brandon Williams --- 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_source *gs); static struct

[PATCH 2/2] grep: fix builds with with no thread support

2017-03-17 Thread Brandon Williams
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 Signed-off-by: Brandon Williams --- builtin/grep.c | 21 + 1 file changed, 9 in

Re: [PATCH] grep: fix build with no thread support

2017-03-17 Thread Brandon Williams
or.sh (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

Re: [PATCH v3 2/5] setup: allow for prefix to be passed to git commands

2017-03-17 Thread Brandon Williams
On 03/17, Stefan Beller wrote: > On Fri, Mar 17, 2017 at 12:08 PM, Brandon Williams wrote: > > On 03/17, Stefan Beller wrote: > >> > prefix = setup_git_directory_gently_1(nongit_ok); > >> > + env_prefix = getenv(GIT_TOPLEVEL_PREFIX_ENVIRON

Re: [PATCH v3 2/5] setup: allow for prefix to be passed to git commands

2017-03-17 Thread Brandon Williams
#x27;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

Re: [PATCH v3 2/5] setup: allow for prefix to be passed to git commands

2017-03-17 Thread Brandon Williams
he 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

Re: [PATCH v3 2/5] setup: allow for prefix to be passed to git commands

2017-03-17 Thread Brandon Williams
On 03/17, Junio C Hamano wrote: > Brandon Williams 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 tell them where the original

Re: [PATCH v4 08/10] clone: teach --recurse-submodules to optionally take a pathspec

2017-03-17 Thread Brandon Williams
On 03/17, Stefan Beller wrote: > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: > > Teach clone --recurse-submodules to optionally take a pathspec argument > > which describes which submodules should be recursively initialized and > > cloned. If no pathspec i

Re: [PATCH v4 09/10] submodule--helper init: set submodule..active

2017-03-17 Thread Brandon Williams
On 03/17, Stefan Beller wrote: > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams 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 means (e.g. a pathsp

Re: [PATCH v4 07/10] submodule init: initialize active submodules

2017-03-17 Thread Brandon Williams
On 03/17, Stefan Beller wrote: > On Thu, Mar 16, 2017 at 3:29 PM, Brandon Williams wrote: > > Teach `submodule init` to initialize submodules which have been > > configured to be active by setting 'submodule.active' with a pathspec. > > > > Now if no path argu

Re: [PATCH] grep: fix build with no thread support

2017-03-17 Thread Brandon Williams
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 > > follo

[PATCH v5 06/10] submodule: decouple url and submodule interest

2017-03-17 Thread Brandon Williams
has the highest order of precedence followed 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

[PATCH v5 09/10] submodule--helper init: set submodule..active

2017-03-17 Thread 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 --- builtin/submodule--helper.c | 12 t/t7400-subm

[PATCH v5 05/10] submodule--helper clone: check for configured submodules using helper

2017-03-17 Thread Brandon Williams
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 --- builtin/submodule--helper.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-

Re: [PATCH] grep: fix build with no thread support

2017-03-17 Thread 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 fo

[PATCH v5 02/10] submodule status: use submodule--helper is-active

2017-03-17 Thread Brandon Williams
Signed-off-by: Brandon Williams --- 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_status() do

[PATCH v5 03/10] submodule sync: skip work for inactive submodules

2017-03-17 Thread Brandon Williams
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 ---

[PATCH v5 08/10] clone: teach --recurse-submodules to optionally take a pathspec

2017-03-17 Thread Brandon Williams
of other commands we already have '--recurse-submodules' to mean recursing into submodules, so advertise this spelling here as the genuine option. Signed-off-by: Brandon Williams --- Documentation/git-clone.txt | 14 ++ builtin/clone.c | 50

Re: [PATCH] run-command: fix segfault when cleaning forked async process

2017-03-17 Thread Brandon Williams
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). > > Reported-by: Bran

[PATCH v5 01/10] submodule--helper: add is-active subcommand

2017-03-17 Thread Brandon Williams
ecks of the configuration variable in scripts. Signed-off-by: Brandon Williams --- builtin/submodule--helper.c| 11 +++ t/t7413-submodule-is-active.sh | 31 +++ 2 files changed, 42 insertions(+) create mode 100755 t/t7413-submodule-is-active.sh diff --git a/buil

[PATCH v5 07/10] submodule init: initialize active submodules

2017-03-17 Thread Brandon Williams
to be active. 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 Wi

[PATCH v5 04/10] submodule sync: use submodule--helper is-active

2017-03-17 Thread Brandon Williams
Signed-off-by: Brandon Williams --- 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 @@ cmd_sync() while read

[PATCH v5 00/10] decoupling url and submodule interest

2017-03-17 Thread Brandon Williams
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

[PATCH v5 10/10] submodule add: respect submodule.active and submodule..active

2017-03-17 Thread Brandon Williams
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 --- git-submodule.sh | 14 ++ t/t7413-submodu

Re: Add configuration options for some commonly used command-line options

2017-03-20 Thread Brandon Williams
e 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

Re: [PATCH v3 2/5] setup: allow for prefix to be passed to git commands

2017-03-20 Thread Brandon Williams
On 03/17, Junio C Hamano wrote: > Brandon Williams 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 was invoked by. So i

Re: [PATCH v3 0/2] bringing attributes to pathspecs

2017-03-21 Thread Brandon Williams
On 03/21, Duy Nguyen wrote: > On Tue, Mar 14, 2017 at 1:23 AM, Brandon Williams wrote: > > v3 fixes some nits in style in the test script (using <<-\EOF instead of > > <<-EOF) > > as well as fixing a few other minor things reported by Junio and Jonathan. > &

[PATCH 1/2] send-pack: send push options correctly in stateless-rpc case

2017-03-22 Thread Brandon Williams
athan Nieder Signed-off-by: Brandon Williams --- 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-pack.c @@ -532,6 +532,14 @@ int send_pack(struct

[PATCH 2/2] remote-curl: allow push options

2017-03-22 Thread Brandon Williams
Teach remote-curl to understand push options and to be able to convey them across HTTP. Signed-off-by: Brandon Williams --- builtin/send-pack.c | 5 + remote-curl.c | 8 t/t5545-push-options.sh | 30 +- 3 files changed, 42 insertions

[PATCH 0/2] push options across http

2017-03-22 Thread Brandon Williams
This series enables push options to be sent across http using remote-curl Thanks to Jonathan Nieder for helping troubleshoot. Brandon Williams (2): send-pack: send push options correctly in stateless-rpc case remote-curl: allow push options builtin/send-pack.c | 5 + remote-curl.c

Re: [PATCH 2/2] remote-curl: allow push options

2017-03-22 Thread Brandon Williams
On 03/22, Junio C Hamano wrote: > Brandon Williams writes: > > > Teach remote-curl to understand push options and to be able to convey > > them across HTTP. > > > > Signed-off-by: Brandon Williams > > --- > > An earlier 438fc684 ("push optio

Re: [PATCH v3 3/5] grep: fix bug when recursing with relative pathspec

2017-03-22 Thread Brandon Williams
On 03/21, Duy Nguyen wrote: > On Sat, Mar 18, 2017 at 12:22 AM, Brandon Williams wrote: > > With these two pieces of information a child process can correctly > > interpret the pathspecs provided by the user as well as being able to > > properly format its output relative

Re: [PATCH 2/2] remote-curl: allow push options

2017-03-22 Thread Brandon Williams
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

Re: [PATCH 1/2] send-pack: send push options correctly in stateless-rpc case

2017-03-22 Thread Brandon Williams
On 03/22, Jonathan Nieder wrote: > Brandon Williams wrote: > > > "git send-pack --stateless-rpc" puts each request in a sequence of pkt-lines > > followed by a flush-pkt. The push option code forgot about this and sends > > push > > options and their ter

[PATCH v2 0/2] push options across http

2017-03-22 Thread Brandon Williams
v2 addresses Jonathan's comments from v1. * Fix a test * Add some documentation * remove short option from --push-option in git send-pack Brandon Williams (2): send-pack: send push options correctly in stateless-rpc case remote-curl: allow push options Documentation/git-send-pac

[PATCH v2 2/2] remote-curl: allow push options

2017-03-22 Thread Brandon Williams
Teach remote-curl to understand push options and to be able to convey them across HTTP. Signed-off-by: Brandon Williams --- Documentation/git-send-pack.txt | 6 ++ builtin/send-pack.c | 5 + remote-curl.c | 8 t/t5545-push-options.sh

[PATCH v2 1/2] send-pack: send push options correctly in stateless-rpc case

2017-03-22 Thread Brandon Williams
athan Nieder Signed-off-by: Brandon Williams --- 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-pack.c @@ -532,6 +532,14 @@ int send_pack(struct

[PATCH] sequencer: fix missing newline

2017-03-23 Thread Brandon Williams
A newline character is missing at the end of the "Stopped at ..." line and before the "You can amend ..." line. This patch fixes the malformed output by adding the missing newline character to the end of the "Stopped at ..." line. Signed-off-by: Brandon Williams --- sequenc

Re: [PATCH] sequencer: fix missing newline

2017-03-23 Thread Brandon Williams
On 03/23, Johannes Schindelin wrote: > Hi Brandon, > > On Thu, 23 Mar 2017, Brandon Williams wrote: > > > When using rebase --interactive where one of the lines is marked as > > 'edit' this is the resulting output: > > > > Stopped at ec3b9

Re: [PATCH] sequencer: fix missing newline

2017-03-23 Thread Brandon Williams
On 03/23, Jeff King wrote: > On Thu, Mar 23, 2017 at 10:47:16AM -0700, Brandon Williams wrote: > > > On 03/23, Johannes Schindelin wrote: > > > Hi Brandon, > > > > > > On Thu, 23 Mar 2017, Brandon Williams wrote: > > > > > > > When us

Re: What's cooking in git.git (Mar 2017, #10; Fri, 24)

2017-03-24 Thread Brandon Williams
at Dscho's config series hit master so I could rebase against that (as there is a small conflict). Aside from that it didn't seem like there were many complaints with the proposed fix. -- Brandon Williams

[PATCH] push: propagate push-options with --recurse-submodules

2017-03-31 Thread Brandon Williams
Teach push --recurse-submodules to propagate push-options recursively to the pushes performed in the submodules. Signed-off-by: Brandon Williams --- submodule.c | 14 +++--- submodule.h | 3 ++- t/t5545-push-options.sh | 39

Re: [PATCH] push: propagate push-options with --recurse-submodules

2017-03-31 Thread 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

[PATCH v2 2/2] push: propagate push-options with --recurse-submodules

2017-03-31 Thread Brandon Williams
Teach push --recurse-submodules to propagate push-options recursively to the pushes performed in the submodules. Signed-off-by: Brandon Williams --- submodule.c | 13 +++-- submodule.h | 1 + t/t5545-push-options.sh | 39

[PATCH v2 1/2] push: unmark a local variable as static

2017-03-31 Thread Brandon Williams
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

[PATCH v2 0/2] propagate push-options

2017-03-31 Thread Brandon Williams
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

Re: [PATCH v2 1/2] push: unmark a local variable as static

2017-03-31 Thread Brandon Williams
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? w

Re: [PATCH] pathspec: always honor `PATHSPEC_PREFIX_ORIGIN` flag

2017-04-03 Thread Brandon Williams
p handles relative paths' ' > + git 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

Re: [PATCH v2] pathspec: honor `PATHSPEC_PREFIX_ORIGIN` with empty prefix

2017-04-04 Thread Brandon Williams
e will end up with at least the string > ":(prefix:0)" and thus avoid the warning. > > Signed-off-by: Patrick Steinhardt > --- > > 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

Re: [RFC] dropping support for ancient versions of curl

2017-04-04 Thread Brandon Williams
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 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

Re: [RFC] dropping support for ancient versions of curl

2017-04-04 Thread Brandon Williams
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 > >

[PATCH v3 0/5] propagating push-options, remote and refspec

2017-04-05 Thread Brandon Williams
] and [2/5] remain unchanged from v2. Brandon Williams (5): push: unmark a local variable as static push: propagate push-options with --recurse-submodules remote: expose parse_push_refspec function submodule--helper: add push-check subcommand push: propagate remote and refspec with --re

[PATCH v3 5/5] push: propagate remote and refspec with --recurse-submodules

2017-04-05 Thread Brandon Williams
urse-submodules" with a path or URL as remote will not propagate the remote or refspec and instead use the default remote and refspec configured in the submodule, preserving the current behavior. Signed-off-by: Brandon Williams --- submodule.c

[PATCH v3 2/5] push: propagate push-options with --recurse-submodules

2017-04-05 Thread Brandon Williams
Teach push --recurse-submodules to propagate push-options recursively to the pushes performed in the submodules. Signed-off-by: Brandon Williams --- submodule.c | 13 +++-- submodule.h | 1 + t/t5545-push-options.sh | 40

<    16   17   18   19   20   21   22   23   24   >