git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Persistent submodule pathspec specification
@ 2016-05-21  0:28 Stefan Beller
  2016-05-21  0:28 ` [PATCH 1/2] submodule update: add `--init-default-path` switch Stefan Beller
  2016-05-21  0:28 ` [PATCH 2/2] clone: add --init-submodule=<pathspec> switch Stefan Beller
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Beller @ 2016-05-21  0:28 UTC (permalink / raw)
  To: gitster, Jens.Lehmann; +Cc: git, Stefan Beller

This was part of the former series 'submodule groups'.
However the labeling was ripped out and goes in its own series
sb/pathspec-label.

First we introduce a switch `--init-default-path` for `git submodule update`
which will read the pathspec to initialize the submodules not from the command
line but from `submodule.defaultUpdatePath`, which can be configured permanently.

The second patch utilizes this by having `clone` set that config option
and using that new option when calling to update the submodules.

Thanks,
Stefan

Stefan Beller (2):
  submodule update: add `--init-default-path` switch
  clone: add --init-submodule=<pathspec> switch

 6 files changed, 216 insertions(+), 14 deletions(-)
 Documentation/config.txt        |   5 ++
 Documentation/git-clone.txt     |  25 +++++---
 Documentation/git-submodule.txt |  11 +++-
 builtin/clone.c                 |  34 +++++++++-
 git-submodule.sh                |  21 ++++++-
 t/t7400-submodule-basic.sh      | 134 ++++++++++++++++++++++++++++++++++++++++

-- 
2.8.3.396.g0eed146

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCHv2 0/2] Persistent submodule pathspec specification
@ 2016-05-24  2:24 Stefan Beller
  2016-05-24  2:24 ` [PATCH 2/2] clone: add --init-submodule=<pathspec> switch Stefan Beller
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Beller @ 2016-05-24  2:24 UTC (permalink / raw)
  Cc: git, sunshine, gitster, pclouds, Stefan Beller

Changes since v1:
 * fixed a broken && chain in a subshell for testing, as pointed out by Eric!

This was part of the former series 'submodule groups'.
However the labeling was ripped out and goes in its own series
sb/pathspec-label.

First we introduce a switch `--init-default-path` for `git submodule update`
which will read the pathspec to initialize the submodules not from the command
line but from `submodule.defaultUpdatePath`, which can be configured permanently.

The second patch utilizes this by having `clone` set that config option
and using that new option when calling to update the submodules.

Thanks,
Stefan

Stefan Beller (2):
  submodule update: add `--init-default-path` switch
  clone: add --init-submodule=<pathspec> switch

 6 files changed, 216 insertions(+), 14 deletions(-)
 Documentation/config.txt        |   5 ++
 Documentation/git-clone.txt     |  25 +++++---
 Documentation/git-submodule.txt |  11 +++-
 builtin/clone.c                 |  34 +++++++++-
 git-submodule.sh                |  21 ++++++-
 t/t7400-submodule-basic.sh      | 134 ++++++++++++++++++++++++++++++++++++++++

-- 
2.8.3.396.g0eed146

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCHv3 0/2] Persistent submodule pathspec specification
@ 2016-05-26 20:47 Stefan Beller
  2016-05-26 20:47 ` [PATCH 2/2] clone: add --init-submodule=<pathspec> switch Stefan Beller
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Beller @ 2016-05-26 20:47 UTC (permalink / raw)
  To: git; +Cc: sunshine, gitster, pclouds, ramsay, Stefan Beller

Changes since v2:
 * I replaced one 0 by NULL as pointed out by Ramsay, and reformatted the line
   to stay within 80 characters:
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -908,8 +908,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                struct string_list_item *item;
                struct strbuf sb = STRBUF_INIT;
                for_each_string_list_item(item, &init_submodules) {
-                       strbuf_addf(&sb, "submodule.defaultUpdatePath=%s", item->string);
-                       string_list_append(&option_config, strbuf_detach(&sb, 0));
+                       strbuf_addf(&sb, "submodule.defaultUpdatePath=%s",
+                                   item->string);
+                       string_list_append(&option_config,
+                                          strbuf_detach(&sb, NULL));
                }
        }
 

Changes since v1:
 * fixed a broken && chain in a subshell for testing, as pointed out by Eric!

This was part of the former series 'submodule groups'.
However the labeling was ripped out and goes in its own series
sb/pathspec-label.

First we introduce a switch `--init-default-path` for `git submodule update`
which will read the pathspec to initialize the submodules not from the command
line but from `submodule.defaultUpdatePath`, which can be configured permanently.

The second patch utilizes this by having `clone` set that config option
and using that new option when calling to update the submodules.

Thanks,
Stefan

Stefan Beller (2):
  submodule update: add `--init-default-path` switch
  clone: add --init-submodule=<pathspec> switch

 Documentation/config.txt        |   5 ++
 Documentation/git-clone.txt     |  25 +++++---
 Documentation/git-submodule.txt |  11 +++-
 builtin/clone.c                 |  36 ++++++++++-
 git-submodule.sh                |  21 ++++++-
 t/t7400-submodule-basic.sh      | 134 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 218 insertions(+), 14 deletions(-)

-- 
2.9.0.rc0.2.g145fc64

base-commit: 3a0f269e7c82aa3a87323cb7ae04ac5f129f036b

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-26 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-21  0:28 [PATCH 0/2] Persistent submodule pathspec specification Stefan Beller
2016-05-21  0:28 ` [PATCH 1/2] submodule update: add `--init-default-path` switch Stefan Beller
2016-05-21  0:28 ` [PATCH 2/2] clone: add --init-submodule=<pathspec> switch Stefan Beller
  -- strict thread matches above, loose matches on Subject: below --
2016-05-24  2:24 [PATCHv2 0/2] Persistent submodule pathspec specification Stefan Beller
2016-05-24  2:24 ` [PATCH 2/2] clone: add --init-submodule=<pathspec> switch Stefan Beller
2016-05-26 20:47 [PATCHv3 0/2] Persistent submodule pathspec specification Stefan Beller
2016-05-26 20:47 ` [PATCH 2/2] clone: add --init-submodule=<pathspec> switch Stefan Beller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).