Submodule shallow recommendation [WAS: Submodules: have a depth field in the .gitmodules file]
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 0 repliesNew
- v22 patches 8 repliesSuperseded
Changes in v3 from the cover letter
* fixed documentation to consistently mention recommend-shallow
* realigned code in the config patch
* Thanks Remi for reviewing! diff to v2:
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | submodule-config: keep shallow recommendation aroundsubmodule-config.c submodule-config.h | +10 | 0 replies | |
| 2/2 | submodule update: learn `--[no-]recommend-shallow` optionDocumentation/ builtin/ git-submodule.sh +1 more | +75 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCHv3 0/2] Submodule shallow recommendation [WAS: Submodules: have a depth field in the .gitmodules file]
v3:
* fixed documentation to consistently mention recommend-shallow
* realigned code in the config patch
* Thanks Remi for reviewing! diff to v2:
Documentation/git-submodule.txt +4 -3
@@ -15,7 +15,7 @@ SYNOPSIS 'git submodule' [--quiet] init [--] [<path>...] 'git submodule' [--quiet] deinit [-f|--force] (--all|[--] <path>...) 'git submodule' [--quiet] update [--init] [--remote] [-N|--no-fetch] - [--[no-]recommended-depth] [-f|--force] [--rebase|--merge] + [--[no-]recommend-shallow] [-f|--force] [--rebase|--merge] [--reference <repository>] [--depth <depth>] [--recursive] [--jobs <n>] [--] [<path>...] 'git submodule' [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
@@ -385,10 +385,11 @@ for linkgit:git-clone[1]'s `--reference` and `--shared` options carefully. clone with a history truncated to the specified number of revisions. See linkgit:git-clone[1] ---[no-]recommended-depth:: +--[no-]recommend-shallow:: This option is only valid for the update command. The initial clone of a submodule will use the recommended - `submodule.<name>.depth` as provided by the .gitmodules file. + `submodule.<name>.shallow` as provided by the .gitmodules file + by default. To ignore the suggestions use `--no-recommend-shallow`. -j <n>:: --jobs <n>::
submodule-config.c +1 -2
@@ -355,8 +355,7 @@ static int parse_config(const char *var, const char *value, void *data) &submodule->update_strategy) < 0)die (_ ("invalid value for %s" ), var); }else if (!strcmp (item.buf,"shallow" )) { -if (!me->overwrite && - submodule->recommend_shallow !=-1 ) +if (!me->overwrite && submodule->recommend_shallow !=-1 )warn_multiple_config (me->commit_sha1, submodule->name,"shallow" );else {
v2:
* Instead of storing the depth, we keep a boolean shallow field in the .gitmodules file.
* slightly renamed options (--recommend-shallow instead of --recommended-depth)
* one more test
* I dropped [PATCH 1/3] submodule update: make use of the existing fetch_in_submodule function as Junio picked it up separately as sb/submodule-misc-cleanups
v1:
Sometimes the history of a submodule is not considered important by the projects upstream. To make it easier for downstream users, allow a field 'submodule.<name>.depth' in .gitmodules, which can be used to indicate the recommended depth.
Thanks,
Stefan
Stefan Beller (2):
submodule-config: keep shallow recommendation around submodule update: learn --[no-]recommend-shallow option
Documentation/git-submodule.txt | 11 +++++++-- builtin/submodule--helper.c | 7 +++++- git-submodule.sh | 9 ++++++- submodule-config.c | 9 +++++++ submodule-config.h | 1 + t/t5614-clone-submodules.sh | 52 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 85 insertions(+), 4 deletions(-)
Signature · 3 lines
2.9.0.rc0.2.g145fc64 base-commit: 3a0f269e7c82aa3a87323cb7ae04ac5f129f036b