git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC 0/2] push checks for unpushed remotes in submodules

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Jun 26, 2011, 18:29 UTC
Message-ID
<1309112987-3185-1-git-send-email-iveqy@iveqy.com>

When working with submodules it is easy to end up in a state when submodule commits required by the super-project only is present locally. This is most often a human error (although technical errors such as connection failure can be a reason).

This patch-series tries to prevent pushing a super-project if not all (by the super-project used) submodules are pushed first. This will prevent the human error of forgetting to push submodules before pushing the super-project.

This is a RFC-series, please consider:
* Is this going into the right direction?
* Should we use a new flag similar to REF_STATUS_REJECT_NONFASTFORWARD?
Future improvements could be:
* Make git status aware of unpushed submodules.
* Show a list of unpushed submodules when a push is denied.
Fredrik Gustafsson (1):
  Don't push a repository with unpushed submodules
Heiko Voigt (1):
  test whether push checks for unpushed remotes in submodules
 submodule.c                    |   79 ++++++++++++++++++++++++++++++++++++++++
 submodule.h                    |    1 +
 t/t5531-deep-submodule-push.sh |   68 ++++++++++++++++++++++++++++++++++
 transport.c                    |    8 ++++
 4 files changed, 156 insertions(+), 0 deletions(-)
-- 
1.7.6.rc3.2.g0185a
Next: Fredrik Gustafsson
Message 1 of 14 in “[RFC 0/2] push checks for unpushed remotes in submodules”
  1. Fredrik GustafssonJun 26, 2011
  2. 1/2 test whether push checks for unpushed remotes in submodulesFredrik Gustafsson, Jun 26, 2011
  3. 2/2 Don't push a repository with unpushed submodulesFredrik Gustafsson, Jun 26, 2011
  4. Junio C HamanoJun 28, 2011
  5. Heiko VoigtJun 28, 2011
  6. Junio C HamanoJun 28, 2011
  7. Fredrik GustafssonJun 28, 2011
  8. Jens LehmannJun 28, 2011
  9. Heiko VoigtJul 4, 2011
  10. Marc BranchaudJun 28, 2011
  11. Jens LehmannJun 28, 2011
  12. Marc BranchaudJun 29, 2011
  13. Fredrik GustafssonJun 28, 2011
  14. Marc BranchaudJun 29, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.