Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Jeff King
On Wed, Mar 22, 2017 at 02:49:48PM -0700, Stefan Beller wrote: > * The syntax of the here-doc was wrong, such that the entire test was > sucked into the here-doc, which is why the test succeeded successfully. As opposed to succeeding unsuccessfully? :) > * The variable $submodulesha1 was not

[PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Stefan Beller
pdate.sh b/t/t7406-submodule-update.sh index 8c086a4..c327eb6 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -425,11 +425,11 @@ test_expect_success 'submodule update - command in .git/config catches failure - ' test_expect_success 'submodule update - command run for

[PATCH 20/20] Documentation: update and rename api-sha1-array.txt

2017-03-18 Thread brian m. carlson
Since the structure and functions have changed names, update the code examples and the documentation. Rename the file to match the new name of the API. Signed-off-by: brian m. carlson <sand...@crustytoothpaste.net> --- .../{api-sha1-array.txt => api-oid-array.txt}

Re: [RFC PATCH 0/3] Git integration update for DC-SHA1

2017-03-17 Thread Jeff King
On Fri, Mar 17, 2017 at 10:09:35AM -0700, Junio C Hamano wrote: > Here are three patches to replace the last two patches from your > series. > > - The Makefile knob is named DC_SHA1, not USE_SHA1DC; this is to >keep it consistent with existing BLK_SHA1 and PPC_SHA1. > > - The CPP macro is

Re: [RFC PATCH 0/3] Git integration update for DC-SHA1

2017-03-17 Thread Junio C Hamano
Junio C Hamano writes: > Here are three patches to replace the last two patches from your > series. > > - The Makefile knob is named DC_SHA1, not USE_SHA1DC; this is to >keep it consistent with existing BLK_SHA1 and PPC_SHA1. > > - The CPP macro is called SHA1_DC, not

[RFC PATCH 0/3] Git integration update for DC-SHA1

2017-03-17 Thread Junio C Hamano
Here are three patches to replace the last two patches from your series. - The Makefile knob is named DC_SHA1, not USE_SHA1DC; this is to keep it consistent with existing BLK_SHA1 and PPC_SHA1. - The CPP macro is called SHA1_DC, not SHA1_SHA1DC; again this is for consistency with

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 <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

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")); > > + > > + gitmodules_config(); > > + > > +

[PATCH 12/19] update submodules: move up prepare_submodule_repo_env

2017-03-14 Thread Stefan Beller
In a later patch we need to prepare the submodule environment with another git directory, so split up the function. Also move it up in the file such that we do not need to declare the function later before using it. Signed-off-by: Stefan Beller --- submodule.c | 29

[PATCH 10/19] update submodules: add a config option to determine if submodules are updated

2017-03-14 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. Have a central place to store such settings whether we want to update a submodule. Signed-off-by: Stefan Beller <sbel...@google.com> --- submodule.c | 6 ++ submodule

[PATCH 14/19] update submodules: add submodule_move_head

2017-03-14 Thread Stefan Beller
+ struct child_process cp1 = CHILD_PROCESS_INIT; + /* also set the HEAD accordingly */ + cp1.git_cmd = 1; + cp1.no_stdin = 1; + cp1.dir = path; + +

[PATCH 09/19] update submodules: add submodule config parsing

2017-03-14 Thread Stefan Beller
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the

[PATCH 05/19] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-14 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/lib-submodule-update.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index c0d6325133..00128f28b5 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@

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

2017-03-14 Thread Junio C Hamano
Brandon Williams writes: > +static void module_list_active(struct module_list *list) > +{ > + int i; > + > + if (read_cache() < 0) > + die(_("index file corrupt")); > + > + gitmodules_config(); > + > + for (i = 0; i < active_nr; i++) { > +

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

2017-03-14 Thread Junio C Hamano
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 been updated before. You mean s/not been update

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

2017-03-13 Thread Brandon Williams
what the user means by git submodule update --init --init-active This new switch allows users to record more complex patterns as it saves retyping them whenever you invoke update. Based on a patch by Stefan Beller <sbel...@google.com> Signed-off-by: Brandon Williams <bmw...@g

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-13 Thread Stefan Beller
On Sat, Mar 11, 2017 at 11:09 PM, Junio C Hamano wrote: > Brandon Williams writes: > >>> diff --git a/submodule.c b/submodule.c >>> index 0b2596e88a..bc5fecf8c5 100644 >>> --- a/submodule.c >>> +++ b/submodule.c >>> @@ -1239,6 +1239,141 @@ int

Re: [GSoC][PATCH 3/3] Update documentation to reflect new socket location

2017-03-13 Thread Junio C Hamano
Devin Lehmacher <lehma...@gmail.com> writes: > Subject: Re: [GSoC][PATCH 3/3] Update documentation to reflect new socket > location Read the above single line and nothing else, while pretending you do not know what this patch is about at all. That is what readers of "git s

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-13 Thread Brandon Williams
On 03/11, Junio C Hamano wrote: > Brandon Williams writes: > > >> diff --git a/submodule.c b/submodule.c > >> index 0b2596e88a..bc5fecf8c5 100644 > >> --- a/submodule.c > >> +++ b/submodule.c > >> @@ -1239,6 +1239,141 @@ int bad_to_remove_submodule(const char *path, > >>

[GSoC][PATCH 3/3] Update documentation to reflect new socket location

2017-03-13 Thread Devin Lehmacher
Signed-off-by: Devin Lehmacher --- Documentation/git-credential-cache.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/git-credential-cache.txt b/Documentation/git-credential-cache.txt index 96208f822..4b9db3856 100644 ---

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-11 Thread Junio C Hamano
Brandon Williams writes: >> diff --git a/submodule.c b/submodule.c >> index 0b2596e88a..bc5fecf8c5 100644 >> --- a/submodule.c >> +++ b/submodule.c >> @@ -1239,6 +1239,141 @@ int bad_to_remove_submodule(const char *path, >> unsigned flags) >> return ret; >> } >> >>

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Brandon Williams
On 03/09, Stefan Beller wrote: > +static void submodule_reset_index(const char *path) > +{ > + struct child_process cp = CHILD_PROCESS_INIT; > + prepare_submodule_repo_env_no_git_dir(_array); > + > + cp.git_cmd = 1; > + cp.no_stdin = 1; > + cp.dir = path; > + > +

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Brandon Williams
On 03/09, Stefan Beller wrote: > +/** > + * Moves a submodule at a given path from a given head to another new head. > + * For edge cases (a submodule coming into existence or removing a submodule) > + * pass NULL for old or new respectively. > + */ > +int submodule_move_head(const char *path, > +

Re: [PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Brandon Williams
array_push(, "--reset"); > + else > + argv_array_push(, "-m"); > + > + argv_array_push(, old ? old : EMPTY_TREE_SHA1_HEX); > + argv_array_push(, new ? new : EMPTY_TREE_SHA1_HEX); > + > + if (run_command()) { >

[PATCH 09/17] update submodules: add a config option to determine if submodules are updated

2017-03-09 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. Have a central place to store such settings whether we want to update a submodule. Signed-off-by: Stefan Beller <sbel...@google.com> --- submodule.c | 6 ++ submodule

[PATCH 11/17] update submodules: move up prepare_submodule_repo_env

2017-03-09 Thread Stefan Beller
In a later patch we need to prepare the submodule environment with another git directory, so split up the function. Also move it up in the file such that we do not need to declare the function later before using it. Signed-off-by: Stefan Beller --- submodule.c | 29

[PATCH 03/17] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-09 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/lib-submodule-update.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index c0d6325133..00128f28b5 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@

[PATCH 08/17] update submodules: add submodule config parsing

2017-03-09 Thread Stefan Beller
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the

[PATCH 12/17] update submodules: add submodule_move_head

2017-03-09 Thread Stefan Beller
: EMPTY_TREE_SHA1_HEX); + + if (run_command()) { + ret = -1; + goto out; + } + + if (!(flags & SUBMODULE_MOVE_HEAD_DRY_RUN)) { + if (new) { + struct child_process cp1 = CHILD_PROCESS_

Re: [PATCH v2 07/11] submodule update: add `--init-active` switch

2017-03-09 Thread Brandon Williams
e arguments before updating. In the first implementation this > > is made incompatible with further command line arguments as it is > > unclear what the user means by > > > > git submodule update --init --init-active > > > > This new switch allows users to record m

Re: [PATCH v2 07/11] submodule update: add `--init-active` switch

2017-03-08 Thread Stefan Beller
this > is made incompatible with further command line arguments as it is > unclear what the user means by > > git submodule update --init --init-active > > This new switch allows users to record more complex patterns as it saves > retyping them whenever you invoke update. > &g

[PATCH v2 07/11] submodule update: add `--init-active` switch

2017-03-08 Thread Brandon Williams
by git submodule update --init --init-active This new switch allows users to record more complex patterns as it saves retyping them whenever you invoke update. Based on a patch by Stefan Beller <sbel...@google.com> Signed-off-by: Brandon Williams <bmw...@google.com> --- Docum

[PATCH 2/4] Update of German translation

2017-03-08 Thread Florian Schüller
eig »%s« umbenennen?" + +#: gitk:9496 +msgid "Rename" +msgstr "Umbenennen" + +#: gitk:9520 msgid "Name:" msgstr "Name:" -#: gitk:9458 +#: gitk:9544 msgid "Please specify a name for the new branch" msgstr "Bitte geben Sie einen Namen für d

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: >> In addition to mkdir(), would we also need the .git file that point >> into superproject's .git/modules/ too? > > The move_head function takes care of it > Both creation as well as deletion are handled in the move_head function, > when either new or

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 3:04 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >>> +if (!is_submodule_populated_gently(ce->name, )) { >>> +struct stat sb; >>> +if (lstat(ce->name,

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Junio C Hamano
Junio C Hamano writes: >> +if (!is_submodule_populated_gently(ce->name, )) { >> +struct stat sb; >> +if (lstat(ce->name, )) >> +die(_("could not stat file '%s'"),

Re: [PATCH 16/18] entry.c: update submodules when interesting

2017-03-07 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > entry.c | 30 ++ > 1 file changed, 30 insertions(+) > > diff --git a/entry.c b/entry.c > index c6eea240b6..d2b512da90 100644 > --- a/entry.c > +++ b/entry.c > @@

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 11:52 AM, Valery Tolstov wrote: > Just noticed that there already is function that gives module list > module_list_compute. But purpose of it's arguments is not quite clear > for me at this moment. > static int module_list_compute(int argc, const char

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Valery Tolstov
Just noticed that there already is function that gives module list module_list_compute. But purpose of it's arguments is not quite clear for me at this moment.

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Stefan Beller
On Tue, Mar 7, 2017 at 10:59 AM, Valery Tolstov wrote: > I think we can reuse code from module_clone that writes .git link. > Possibly this code fragment needs to be factored out from module_clone That fragment already exists, see dir.h:

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-07 Thread Valery Tolstov
I think we can reuse code from module_clone that writes .git link. Possibly this code fragment needs to be factored out from module_clone Also, to fix all the links, we need to obtain the list of submodules and then iterate over them. module_list command iterates and prints the result to stdout.

[PATCH 09/18] update submodules: add a config option to determine if submodules are updated

2017-03-06 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. Have a central place to store such settings whether we want to update a submodule. Signed-off-by: Stefan Beller <sbel...@google.com> --- submodule.c | 6 ++ submodule

Re: [PATCH 03/18] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-06 Thread Stefan Beller
On Wed, Mar 1, 2017 at 6:11 PM, Eric Wong wrote: > Stefan Beller wrote: >> test_submodule_content () { >> + if test "$1" == "-C" > > Use a single '=' for portability in sh. It's also a good idea > to prefix variables with 'x' or some such, since "$1"

Re: [PATCH 03/18] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-06 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > t/lib-submodule-update.sh | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh > index c0d6325133..00128f28b5 100755 > ---

[PATCH 08/18] update submodules: add submodule config parsing

2017-03-06 Thread Stefan Beller
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the

[PATCH 11/18] update submodules: move up prepare_submodule_repo_env

2017-03-06 Thread Stefan Beller
In a later patch we need to prepare the submodule environment with another git directory, so split up the function. Also move it up in the file such that we do not need to declare the function later before using it. Signed-off-by: Stefan Beller --- submodule.c | 29

[PATCH 16/18] entry.c: update submodules when interesting

2017-03-06 Thread Stefan Beller
Signed-off-by: Stefan Beller --- entry.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/entry.c b/entry.c index c6eea240b6..d2b512da90 100644 --- a/entry.c +++ b/entry.c @@ -2,6 +2,7 @@ #include "blob.h" #include "dir.h" #include

[PATCH 12/18] update submodules: add submodule_move_head

2017-03-06 Thread Stefan Beller
: EMPTY_TREE_SHA1_HEX); + + if (run_command()) { + ret = -1; + goto out; + } + + if (!(flags & SUBMODULE_MOVE_HEAD_DRY_RUN)) { + if (new) { + struct child_process cp1 = CHILD_PROCESS_

[PATCH 03/18] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-06 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/lib-submodule-update.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index c0d6325133..00128f28b5 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@

Re: [PATCH 03/18] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-06 Thread Stefan Beller
On Mon, Mar 6, 2017 at 12:30 PM, Stefan Beller wrote: > > as well as another fix in git-submodule.sh > I spoke too early, that seems like a false positive.

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-06 Thread Stefan Beller
On Sat, Mar 4, 2017 at 6:15 AM, Valery Tolstov wrote: > Looking for microproject ideas for GSoC. > Would this issue be suitable as the microproject? It would be a good project, but not as 'micro' I would assume. ;) Why it is not a micro project: To fix this issue we'd want to

[PATCH v5 06/22] update-index: warn in case of split-index incoherency

2017-03-06 Thread Christian Couder
When users are using `git update-index --(no-)split-index`, they may expect the split-index feature to be used or not according to the option they just used, but this might not be the case if the new "core.splitIndex" config variable has been set. In this case let's warn about what w

[PATCH v5 09/22] Documentation/git-update-index: talk about core.splitIndex config var

2017-03-06 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/git-update-index.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 7386c93162..e091b2a409 100644 --- a/Documentation/git-

[PATCH v5 22/22] Documentation/git-update-index: explain splitIndex.*

2017-03-06 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/config.txt | 2 +- Documentation/git-update-index.txt | 37 + 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/Documentation/config.txt b/Documen

Re: git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-04 Thread Valery Tolstov
Looking for microproject ideas for GSoC. Would this issue be suitable as the microproject? Thanks, Valery Tolstov

git init --separate-git-dir does not update symbolic .git links for submodules

2017-03-04 Thread Sven Strickroth
Hi, clone or have a repository with submodules. Now issue "git init --separate-git-dir ../test" which moves the content of the .git direcotry to the ../test directory and replaces the .git directory with a .git file "link". However, for all submodules the .git-file is not updated and still

Re: [PATCH 03/18] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-01 Thread Eric Wong
Stefan Beller wrote: > test_submodule_content () { > + if test "$1" == "-C" Use a single '=' for portability in sh. It's also a good idea to prefix variables with 'x' or some such, since "$1" could be "-n" or some other supported switch for test(1). So, something like:

[PATCH 03/18] lib-submodule-update: teach test_submodule_content the -C flag

2017-03-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/lib-submodule-update.sh | 5 + 1 file changed, 5 insertions(+) diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh index c0d6325133..a906c92cfb 100755 --- a/t/lib-submodule-update.sh +++ b/t/lib-submodule-update.sh @@

[PATCH 11/18] update submodules: move up prepare_submodule_repo_env

2017-03-01 Thread Stefan Beller
In a later patch we need to prepare the submodule environment with another git directory, so split up the function. Also move it up in the file such that we do not need to declare the function later before using it. Signed-off-by: Stefan Beller --- submodule.c | 29

[PATCH 08/18] update submodules: add submodule config parsing

2017-03-01 Thread Stefan Beller
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the

[PATCH 16/18] entry.c: update submodules when interesting

2017-03-01 Thread Stefan Beller
Signed-off-by: Stefan Beller --- entry.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/entry.c b/entry.c index c6eea240b6..d2b512da90 100644 --- a/entry.c +++ b/entry.c @@ -2,6 +2,7 @@ #include "blob.h" #include "dir.h" #include

[PATCH 12/18] update submodules: add submodule_move_head

2017-03-01 Thread Stefan Beller
: EMPTY_TREE_SHA1_HEX); + + if (run_command()) { + ret = -1; + goto out; + } + + if (!(flags & SUBMODULE_MOVE_HEAD_DRY_RUN)) { + if (new) { + struct child_process cp1 = CHILD_PROCESS_

[PATCH 09/18] update submodules: add a config option to determine if submodules are updated

2017-03-01 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. Have a central place to store such settings whether we want to update a submodule. Signed-off-by: Stefan Beller <sbel...@google.com> --- submodule.c | 6 ++ submodule

Re: 'git submodules update' ignores credential.helper config of the parent repository

2017-02-28 Thread Jeff King
On Tue, Feb 28, 2017 at 12:21:57PM -0800, Stefan Beller wrote: > > I'm still open to the idea that we simply improve the documentation to > > make it clear that per-repo config really is per-repo, and is not shared > > between super-projects and submodules. And then something like Duy's > >

Re: 'git submodules update' ignores credential.helper config of the parent repository

2017-02-28 Thread Stefan Beller
On Tue, Feb 28, 2017 at 12:08 PM, Jeff King wrote: > On Tue, Feb 28, 2017 at 10:05:24AM -0800, Stefan Beller wrote: > >> > I have a feeling that something like this would create unwelcome corner >> > cases in the config-writer, which is otherwise does not have to care >> > about

Re: 'git submodules update' ignores credential.helper config of the parent repository

2017-02-28 Thread Jeff King
On Tue, Feb 28, 2017 at 10:05:24AM -0800, Stefan Beller wrote: > > I have a feeling that something like this would create unwelcome corner > > cases in the config-writer, which is otherwise does not have to care > > about which existing section of a file it adds a key to. > > Yeah the writer

Re: 'git submodules update' ignores credential.helper config of the parent repository

2017-02-28 Thread Stefan Beller
On Tue, Feb 28, 2017 at 6:37 AM, Jeff King wrote: >> >> This would change the semantics of a config file as the attribute for >> each setting depends on the location (was attribute.FOO.read = >> {true, false} read before). > > I'm not enthused by this, just because there is a

Re: 'git submodules update' ignores credential.helper config of the parent repository

2017-02-28 Thread Jeff King
On Mon, Feb 27, 2017 at 11:09:12AM -0800, Stefan Beller wrote: > For worktrees these multiple config files sounded like > the obvious solution, but I wonder if there was also > some bike shedding about other solutions? > > I could imagine that we would want to have attributes > for specific

Re: 'git submodules update' ignores credential.helper config of the parent repository

2017-02-27 Thread Stefan Beller
On Mon, Feb 27, 2017 at 5:33 AM, Dmitry Neverov <dmitry.neve...@gmail.com> wrote:> > git -c credential.helper= submodule update > > Is it by design? A similar question came up w.r.t. submodule configuration recently. It is about url..insteadOf[1] that is set in the super proje

[PATCH v4 22/22] Documentation/git-update-index: explain splitIndex.*

2017-02-27 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/config.txt | 2 +- Documentation/git-update-index.txt | 37 + 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/Documentation/config.txt b/Documen

[PATCH v4 06/22] update-index: warn in case of split-index incoherency

2017-02-27 Thread Christian Couder
When users are using `git update-index --(no-)split-index`, they may expect the split-index feature to be used or not according to the option they just used, but this might not be the case if the new "core.splitIndex" config variable has been set. In this case let's warn about what w

[PATCH v4 09/22] Documentation/git-update-index: talk about core.splitIndex config var

2017-02-27 Thread Christian Couder
Signed-off-by: Christian Couder <chrisc...@tuxfamily.org> --- Documentation/git-update-index.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt index 7386c93162..e091b2a409 100644 --- a/Documentation/git-

'git submodules update' ignores credential.helper config of the parent repository

2017-02-27 Thread Dmitry Neverov
I'm checking out a repository in a non-interactive environment and would like to disable interactive credential helpers. According to [1] it can be done by specifying an empty helper in a local config: [credential] helper = But the submodule update command ignores the helper specified

[PATCH 1/6 v5] revision.c: do not update argv with unknown option

2017-02-24 Thread Siddharth Kannan
handle_revision_opt() tries to recognize and handle the given argument. If an option was unknown to it, it used to add the option to unkv[(*unkc)++]. This increment of unkc causes the variable in the caller to change. Teach handle_revision_opt to not update unknown arguments inside unkc anymore

[PATCH 1/6 v5] revision.c: do not update argv with unknown option

2017-02-24 Thread Siddharth Kannan
handle_revision_opt() tries to recognize and handle the given argument. If an option was unknown to it, it used to add the option to unkv[(*unkc)++]. This increment of unkc causes the variable in the caller to change. Teach handle_revision_opt to not update unknown arguments inside unkc anymore

Re: [PATCH 10/15] update submodules: add submodule_move_head

2017-02-24 Thread Stefan Beller
On Thu, Feb 23, 2017 at 5:21 PM, Ramsay Jones wrote: > > > On 23/02/17 22:57, Stefan Beller wrote: >> In later patches we introduce the options and flag for commands >> that modify the working directory, e.g. git-checkout. >> >> This piece of code will be used

Re: [PATCH 10/15] update submodules: add submodule_move_head

2017-02-23 Thread Ramsay Jones
On 23/02/17 22:57, Stefan Beller wrote: > In later patches we introduce the options and flag for commands > that modify the working directory, e.g. git-checkout. > > This piece of code will be used universally for > all these working tree modifications as it > * supports dry run to answer the

[PATCH 02/10] submodule update: add `--init-active` switch

2017-02-23 Thread Brandon Williams
by git submodule update --init --init-active This new switch allows users to record more complex patterns as it saves retyping them whenever you invoke update. Based on a patch by Stefan Beller <sbel...@google.com> Signed-off-by: Brandon Williams <bmw...@google.com> --- Docum

[PATCH 10/15] update submodules: add submodule_move_head

2017-02-23 Thread Stefan Beller
: EMPTY_TREE_SHA1_HEX); + + if (run_command()) { + ret = -1; + goto out; + } + + if (!(flags & SUBMODULE_MOVE_HEAD_DRY_RUN)) { + if (new) { + struct child_process cp1 = CHILD_PROCESS_

[PATCH 07/15] update submodules: add a config option to determine if submodules are updated

2017-02-23 Thread Stefan Beller
In later patches we introduce the options and flag for commands that modify the working directory, e.g. git-checkout. Have a central place to store such settings whether we want to update a submodule. Signed-off-by: Stefan Beller <sbel...@google.com> --- submodule.c | 6 ++ submodule

[PATCH 14/15] entry.c: update submodules when interesting

2017-02-23 Thread Stefan Beller
Signed-off-by: Stefan Beller --- entry.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/entry.c b/entry.c index c6eea240b6..d2b512da90 100644 --- a/entry.c +++ b/entry.c @@ -2,6 +2,7 @@ #include "blob.h" #include "dir.h" #include

[PATCH 06/15] update submodules: add submodule config parsing

2017-02-23 Thread Stefan Beller
Similar to b33a15b08 (push: add recurseSubmodules config option, 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code that is later used to parse whether we are interested in updating submodules. We need the

[PATCH 09/15] update submodules: move up prepare_submodule_repo_env

2017-02-23 Thread Stefan Beller
In a later patch we need to prepare the submodule environment with another git directory, so split up the function. Also move it up in the file such that we do not need to declare the function later before using it. Signed-off-by: Stefan Beller --- submodule.c | 29

Re: [PATCH 06/15] update submodules: add submodule config parsing

2017-02-21 Thread Jacob Keller
On Tue, Feb 21, 2017 at 11:42 AM, Stefan Beller wrote: > On Fri, Feb 17, 2017 at 10:24 AM, Jacob Keller wrote: >> >> Ok so this function here reads a recurse submodules parameter which is >> a boolean or it can be set to the word "checkout"? Why does

Re: [PATCH 06/15] update submodules: add submodule config parsing

2017-02-21 Thread Stefan Beller
On Fri, Feb 17, 2017 at 10:24 AM, Jacob Keller wrote: > > Ok so this function here reads a recurse submodules parameter which is > a boolean or it can be set to the word "checkout"? Why does checkout > need its own value separate from true? Just so that we have a synonym?

[PATCH v2 2/4] update-ref: pass reflog message to delete_ref()

2017-02-20 Thread Kyle Meyer
Now that delete_ref() accepts a reflog message, pass the user-provided message to delete_ref() rather than silently dropping it. Signed-off-by: Kyle Meyer <k...@kyleam.com> --- builtin/update-ref.c | 2 +- t/t1400-update-ref.sh | 18 ++ 2 files changed, 19 insertions

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Jeff King
On Fri, Feb 17, 2017 at 06:40:28PM -0500, Kyle Meyer wrote: > > For reference, the two things I notice are: > > > > - we prefer test_path_is_missing to "! test -f" these days. > > > > - we don't redirect the output of grep (it's handled already in > > non-verbose mode, and in verbose mode

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Kyle Meyer
Jeff King <p...@peff.net> writes: [...] >> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh >> index b0ffc0b57..65918d984 100755 >> --- a/t/t1400-update-ref.sh >> +++ b/t/t1400-update-ref.sh >> @@ -85,6 +85,15 @@ test_expect_success "delet

Re: [PATCH 06/15] update submodules: add submodule config parsing

2017-02-17 Thread Jacob Keller
On Wed, Feb 15, 2017 at 4:38 PM, Stefan Beller wrote: > Similar to b33a15b08 (push: add recurseSubmodules config option, > 2015-11-17) and 027771fcb1 (submodule: allow erroneous values for the > fetchRecurseSubmodules option, 2015-08-17), we add submodule-config code > that is

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Junio C Hamano
Jeff King writes: > ... All good review comments. I briefly wondered if recording the deletion of the current branch in HEAD's reflog has much practical values (Porcelain "git branch" would not even allow deletion in the first place), but because it is a rare and unusual event,

Re: [PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-17 Thread Jeff King
with the ref, but this entry will show up in HEAD's > reflog when deleting a checked out branch. Sounds good. > diff --git a/builtin/update-ref.c b/builtin/update-ref.c > index a41f9adf1..f642acc22 100644 > --- a/builtin/update-ref.c > +++ b/builtin/update-ref.c > @@ -435,7 +435,7

[PATCH 2/3] update-ref: pass reflog message argument to delete_refs

2017-02-16 Thread Kyle Meyer
branch. Signed-off-by: Kyle Meyer <k...@kyleam.com> --- I'm not sure if the test here (or in the next patch) is worth including. builtin/update-ref.c | 2 +- t/t1400-update-ref.sh | 9 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/builtin/update-ref.c b/builtin/

Re: [PATCH 10/15] update submodules: add submodule_go_from_to

2017-02-16 Thread Stefan Beller
in the submodule? The operation in builtin/checkout.c that > conceptually correspond to this is called switch_branches(), I > think, so perhaps submodule_switch_branches() is a better name? Well as of now all submodule operations (submodule update mostly) end up with detached HEADs in the

Re: [PATCH 10/15] update submodules: add submodule_go_from_to

2017-02-16 Thread Junio C Hamano
> + argv_array_push(, "-n"); > + else > + argv_array_push(, "-u"); > + > + if (force) > + argv_array_push(, "--reset"); > + else > + argv_array_push(, "-m"); > + &

Re: [PATCH 1/4 v4] revision.c: do not update argv with unknown option

2017-02-16 Thread Siddharth Kannan
Hey Matthieu, On 16 February 2017 at 23:52, Matthieu Moy wrote: > > Indeed, I misread the patch. The explanation could be a little bit more > "tired-reviewer-proof" by not using a past tone, perhaps > > 1. setup_revision, which is changed to ... Oh, okay! Sorry

Re: [PATCH 1/4 v4] revision.c: do not update argv with unknown option

2017-02-16 Thread Matthieu Moy
t;> an >>> option was unknown to it, it used to add the option to unkv[(*unkc)++]. >>> This >>> increment of unkc causes the variable in the caller to change. >>> >>> Teach handle_revision_opt to not update unknown arguments inside unkc >>&g

Re: [PATCH 1/4 v4] revision.c: do not update argv with unknown option

2017-02-16 Thread Junio C Hamano
+]. This >> increment of unkc causes the variable in the caller to change. >> >> Teach handle_revision_opt to not update unknown arguments inside unkc >> anymore. >> This is now the responsibility of the caller. >> >> There are two callers of this function

Re: [PATCH 1/4 v4] revision.c: do not update argv with unknown option

2017-02-16 Thread Matthieu Moy
ange. > > Teach handle_revision_opt to not update unknown arguments inside unkc anymore. > This is now the responsibility of the caller. > > There are two callers of this function: > > 1. setup_revision: Changes have been made so that setup_revision will now > update the unknown o

[PATCH 1/4 v4] revision.c: do not update argv with unknown option

2017-02-16 Thread Siddharth Kannan
handle_revision_opt() tries to recognize and handle the given argument. If an option was unknown to it, it used to add the option to unkv[(*unkc)++]. This increment of unkc causes the variable in the caller to change. Teach handle_revision_opt to not update unknown arguments inside unkc anymore

[PATCH 14/15] entry.c: update submodules when interesting

2017-02-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- entry.c | 28 1 file changed, 28 insertions(+) diff --git a/entry.c b/entry.c index c6eea240b6..ae40611c97 100644 --- a/entry.c +++ b/entry.c @@ -2,6 +2,7 @@ #include "blob.h" #include "dir.h" #include

<    4   5   6   7   8   9   10   11   12   13   >