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

[PATCH v2 0/3] check for unpushed remotes in submodules

From
Fredrik Gustafsson <iveqy@iveqy.com>
Date
Jul 27, 2011, 18:10 UTC
Message-ID
<1311790250-32454-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 superproject 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 superproject if not all (by the superproject used) submodules are pushed first. This will prevent the human error of forgetting to push submodules before pushing the superproject.

The first iteration of this patch series can be found here: http://thread.gmane.org/gmane.comp.version-control.git/176328/focus=176327

The changes from the previous iteration are in patch 0003.

Regarding the discussion of superprojects with submodules that have no remote tracking branches: A push will still be denied. After some discussion we did not consider this a drawback since all submodules that are added/handled using the submodule script will have remote tracking branches. Even if the submodules are not pushable when the superproject records a commit that is reachable from a remote branch the push will not be denied.

A new test is added in this iteration to show a bug that now is fixed.
Fredrik Gustafsson (2):
  push: Don't push a repository with unpushed submodules
  push: Add the --no-recurse-submodules option
Heiko Voigt (1):
  test whether push checks for unpushed remotes in submodules
 Documentation/git-push.txt     |    6 ++
 builtin/push.c                 |    1 +
 submodule.c                    |  115 ++++++++++++++++++++++++++++++++++++++++
 submodule.h                    |    1 +
 t/t5531-deep-submodule-push.sh |   99 ++++++++++++++++++++++++++++++++++
 transport.c                    |   10 ++++
 transport.h                    |    1 +
 7 files changed, 233 insertions(+), 0 deletions(-)
-- 
1.7.6.236.g7ad21
Next: Fredrik Gustafsson
Message 1 of 10 in “check for unpushed remotes in submodules”
  1. 0/3 check for unpushed remotes in submodulesFredrik Gustafsson, Jul 27, 2011
  2. 1/3 test whether push checks for unpushed remotes in submodulesFredrik Gustafsson, Jul 27, 2011
  3. 2/3 push: Don't push a repository with unpushed submodulesFredrik Gustafsson, Jul 27, 2011
  4. 3/3 push: Add the --no-recurse-submodules optionFredrik Gustafsson, Jul 27, 2011
  5. Junio C HamanoJul 28, 2011
  6. Jens LehmannJul 28, 2011
  7. Jens LehmannJul 29, 2011
  8. Junio C HamanoAug 1, 2011
  9. Junio C HamanoJul 28, 2011
  10. Jens LehmannJul 28, 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.