Skip to content

submodule: drop the top-level requirement

John Keeping git 4 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 1 replyIn review
  2. v32 patches 11 repliesSuperseded
  3. v22 patches 9 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches6 repliesSuperseded

Changes in v4 from the cover letter

* There are four new patches, three of which are style fixes for existing tests and one fixes an existing error message to return a more accurate path when recursing.

* You now cannot run "git submodule add <relative URL>" from a subdirectory. Because the interpretation of the URL changes depending on whether or not remote.origin.url is configured, I have decided to just ban this for now. If someone comes up with a sensible way to handle this then we can lift this restriction later.

* The "path" variable exported in "submodule foreach" now uses the relative path and matches the "sm_path" variable.

* I audited the code again and fixed a few more cases that weren't printing relative paths (notably "submodule init" and "submodule foreach").

* More tests.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6t7401: make indentation consistentt/t7401-submodule-summary.sh+40 -400 replies
2/6t7403: modernize stylet/t7403-submodule-sync.sh+183 -1330 replies
3/6t7403: add missing && chainingt/t7403-submodule-sync.sh+2 -20 replies
4/6submodule: show full path in error messagegit-submodule.sh+1 -10 replies
5/6rev-parse: add --prefix optionDocumentation/git-rev-parse.txt builtin/rev-parse.c t/t1513-rev-parse-prefix.sh+131 -50 replies
6/6submodule: drop the top-level requirementgit-submodule.sh t/t7400-submodule-basic.sh t/t7401-submodule-summary.sh +3 more+319 -350 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/6] submodule: drop the top-level requirement

Changes since v3:

* There are four new patches, three of which are style fixes for existing tests and one fixes an existing error message to return a more accurate path when recursing.

* You now cannot run "git submodule add <relative URL>" from a subdirectory. Because the interpretation of the URL changes depending on whether or not remote.origin.url is configured, I have decided to just ban this for now. If someone comes up with a sensible way to handle this then we can lift this restriction later.

* The "path" variable exported in "submodule foreach" now uses the relative path and matches the "sm_path" variable.

* I audited the code again and fixed a few more cases that weren't printing relative paths (notably "submodule init" and "submodule foreach").

* More tests.

John Keeping (6):
t7401: make indentation consistent
t7403: modernize style
t7403: add missing && chaining
submodule: show full path in error message
rev-parse: add --prefix option
submodule: drop the top-level requirement

 Documentation/git-rev-parse.txt |  16 ++
 builtin/rev-parse.c             |  24 ++-
 git-submodule.sh                | 135 ++++++++++----
 t/t1513-rev-parse-prefix.sh     |  96 ++++++++++
 t/t7400-submodule-basic.sh      |  80 +++++++++
 t/t7401-submodule-summary.sh    | 116 +++++++-----
 t/t7403-submodule-sync.sh       | 388 ++++++++++++++++++++++++++--------------
 t/t7406-submodule-update.sh     |  15 ++
 t/t7407-submodule-foreach.sh    |  16 ++
 9 files changed, 673 insertions(+), 213 deletions(-)
 create mode 100755 t/t1513-rev-parse-prefix.sh
Signature · 1 line
1.8.3.779.g691e267