From: Antonio Ospite <ao2@ao2.it>
To: git@vger.kernel.org
Cc: "Brandon Williams" <bmwill@google.com>,
"Daniel Graña" <dangra@gmail.com>,
"Jonathan Nieder" <jrnieder@gmail.com>,
"Richard Hartmann" <richih.mailinglist@gmail.com>,
"Stefan Beller" <sbeller@google.com>,
"Antonio Ospite" <ao2@ao2.it>
Subject: [PATCH v4 0/9] Make submodules work if .gitmodules is not checked out
Date: Fri, 24 Aug 2018 15:29:42 +0200 [thread overview]
Message-ID: <20180824132951.8000-1-ao2@ao2.it> (raw)
Hi,
this series teaches git to try and read the .gitmodules file from the
index (:.gitmodules) and the current branch (HEAD:.gitmodules) when it
is not readily available in the working tree.
This can be used, together with sparse checkouts, to enable submodule
usage with programs like vcsh[1] which manage multiple repositories with
their working trees sharing the same path.
[1] https://github.com/RichiH/vcsh
In v4 patches 1, 2, 5, 6, and 7 are basically the same as in the
previous series; the review can concentrate on patches 3, 4, 8, and 9.
v3 of the series is here:
https://public-inbox.org/git/20180814110525.17801-1-ao2@ao2.it/
v2 of the series is here:
https://public-inbox.org/git/20180802134634.10300-1-ao2@ao2.it/
v1 of the series, with some background info, is here:
https://public-inbox.org/git/20180514105823.8378-1-ao2@ao2.it/
Changes since v3:
* Improve robustness of current tests in t7411-submodule-config.sh:
- merge two tests that check for effects of the same commit.
- reset to a well defined point in history when exiting the tests.
* Fix style issues in new tests added to t7411-submodule-config.sh:
- use test_when_finished in new tests.
- name the output file 'expect' instead of 'expected'.
* Add a new "submodule--helper config --check-writeable" command.
* Use "s--h config --check-wrteable" in git-submodule.sh to share the
code with the C implementation instead of duplicating the safety
check in shell script.
* Add the ability to read .gitmodules from the index and then
fall-back to the current branch if the file is not in the index.
Add also more tests to validate all the possible scenarios.
* Fix style issues in t7416-submodule-sparse-gitmodules.sh:
- name the output file 'expect' instead of 'expected'.
- remove white space after the redirection operator.
- indent the HEREDOC block.
- use "git -C super" instead of a subshell when there is only one
command in the test.
* Remove a stale file named 'new' which erroneusly slipped in
a commit.
* Update some comments and commit messages.
Thanks,
Antonio
Antonio Ospite (9):
submodule: add a print_config_from_gitmodules() helper
submodule: factor out a config_set_in_gitmodules_file_gently function
t7411: merge tests 5 and 6
t7411: be nicer to future tests and really clean things up
submodule--helper: add a new 'config' subcommand
submodule: use the 'submodule--helper config' command
t7506: clean up .gitmodules properly before setting up new scenario
submodule: add a helper to check if it is safe to write to .gitmodules
submodule: support reading .gitmodules when it's not in the working
tree
builtin/submodule--helper.c | 40 +++++++++
cache.h | 2 +
git-submodule.sh | 13 ++-
submodule-config.c | 55 ++++++++++++-
submodule-config.h | 3 +
submodule.c | 28 +++++--
submodule.h | 1 +
t/t7411-submodule-config.sh | 107 +++++++++++++++++++++----
t/t7416-submodule-sparse-gitmodules.sh | 78 ++++++++++++++++++
t/t7506-status-submodule.sh | 3 +-
10 files changed, 301 insertions(+), 29 deletions(-)
create mode 100755 t/t7416-submodule-sparse-gitmodules.sh
--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
next reply other threads:[~2018-08-24 13:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-24 13:29 Antonio Ospite [this message]
2018-08-24 13:29 ` [PATCH v4 1/9] submodule: add a print_config_from_gitmodules() helper Antonio Ospite
2018-08-24 14:32 ` Ævar Arnfjörð Bjarmason
2018-08-24 16:52 ` Antonio Ospite
2018-09-04 7:10 ` Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 2/9] submodule: factor out a config_set_in_gitmodules_file_gently function Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 3/9] t7411: merge tests 5 and 6 Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 4/9] t7411: be nicer to future tests and really clean things up Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 5/9] submodule--helper: add a new 'config' subcommand Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 6/9] submodule: use the 'submodule--helper config' command Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 7/9] t7506: clean up .gitmodules properly before setting up new scenario Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 8/9] submodule: add a helper to check if it is safe to write to .gitmodules Antonio Ospite
2018-08-24 13:29 ` [PATCH v4 9/9] submodule: support reading .gitmodules when it's not in the working tree Antonio Ospite
2018-08-24 14:38 ` [PATCH v4 0/9] Make submodules work if .gitmodules is not checked out Ævar Arnfjörð Bjarmason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180824132951.8000-1-ao2@ao2.it \
--to=ao2@ao2.it \
--cc=bmwill@google.com \
--cc=dangra@gmail.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=richih.mailinglist@gmail.com \
--cc=sbeller@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).