Thread (12 messages) flat view 12 messages, 3 authors, 2016-11-16
STALE3553d

Revision v3 of 2 in this series.

Revisions (2)
  1. v3 current
  2. v4 [diff vs current]

[PATCH v3 4/4] submodule_needs_pushing() NEEDSWORK when we can not answer this question

From: Heiko Voigt <hidden>
Date: 2016-11-15 14:57:33
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Heiko Voigt <redacted>
---
 submodule.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/submodule.c b/submodule.c
index e1196fd..29efee9 100644
--- a/submodule.c
+++ b/submodule.c
@@ -531,6 +531,14 @@ static int submodule_has_commits(const char *path, struct sha1_array *commits)
 static int submodule_needs_pushing(const char *path, struct sha1_array *commits)
 {
 	if (!submodule_has_commits(path, commits))
+		/* NEEDSWORK: The correct answer here is "We do not
+		 * know" instead of "No push needed". We currently
+		 * proceed pushing here as if the submodules commits are
+		 * available on a remote. Since we can not check the
+		 * remote availability for this submodule we should
+		 * consider changing this behavior to: Stop here and
+		 * tell the user how to skip this check if wanted.
+		 */
 		return 0;
 
 	if (for_each_remote_ref_submodule(path, has_remote, NULL) > 0) {
-- 
2.10.1.386.gc503e45
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help