git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] submodule config lookup API
@ 2015-06-02 14:24 Heiko Voigt
  2015-06-02 14:25 ` [PATCH v4 1/4] implement submodule config cache for lookup of submodule names Heiko Voigt
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Heiko Voigt @ 2015-06-02 14:24 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git, Jens Lehmann, Jonathan Nieder, Jeff King, W. Trevor King,
	Eric Sunshine, Karsten Blees

Since there were no other comments than style fixes here is another
iteration. The last iteration can be found here:

http://article.gmane.org/gmane.comp.version-control.git/269611

I found there is a merge conflict with master so I rebased this series
to master.

The interdiff to last iteration contains nothing spectacular:

diff --git a/submodule-config.c b/submodule-config.c
index 177767d..199692b 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -27,7 +27,7 @@ struct submodule_entry {
 
 enum lookup_type {
 	lookup_name,
-	lookup_path,
+	lookup_path
 };
 
 static struct submodule_cache cache;
@@ -390,12 +390,12 @@ static const struct submodule *config_from(struct submodule_cache *cache,
 		return submodule;
 
 	switch (lookup_type) {
-		case lookup_name:
-			submodule = cache_lookup_name(cache, sha1, key);
-			break;
-		case lookup_path:
-			submodule = cache_lookup_path(cache, sha1, key);
-			break;
+	case lookup_name:
+		submodule = cache_lookup_name(cache, sha1, key);
+		break;
+	case lookup_path:
+		submodule = cache_lookup_path(cache, sha1, key);
+		break;
 	}
 	if (submodule)
 		return submodule;
@@ -419,12 +419,12 @@ static const struct submodule *config_from(struct submodule_cache *cache,
 	free(config);
 
 	switch (lookup_type) {
-		case lookup_name:
-			submodule = cache_lookup_name(cache, sha1, key);
-			break;
-		case lookup_path:
-			submodule = cache_lookup_path(cache, sha1, key);
-			break;
+	case lookup_name:
+		submodule = cache_lookup_name(cache, sha1, key);
+		break;
+	case lookup_path:
+		submodule = cache_lookup_path(cache, sha1, key);
+		break;
 	}
 
 	return submodule;
diff --git a/submodule-config.h b/submodule-config.h
index 58afc83..9061e4e 100644
--- a/submodule-config.h
+++ b/submodule-config.h
@@ -24,6 +24,6 @@ const struct submodule *submodule_from_name(const unsigned char *commit_sha1,
 		const char *name);
 const struct submodule *submodule_from_path(const unsigned char *commit_sha1,
 		const char *path);
-void submodule_free();
+void submodule_free(void);
 
 #endif /* SUBMODULE_CONFIG_H */


Heiko Voigt (4):
  implement submodule config cache for lookup of submodule names
  extract functions for submodule config set and lookup
  use new config API for worktree configurations of submodules
  do not die on error of parsing fetchrecursesubmodules option

 .gitignore                                       |   1 +
 Documentation/technical/api-submodule-config.txt |  63 +++
 Makefile                                         |   2 +
 builtin/checkout.c                               |   1 +
 builtin/fetch.c                                  |   1 +
 diff.c                                           |   1 +
 submodule-config.c                               | 484 +++++++++++++++++++++++
 submodule-config.h                               |  29 ++
 submodule.c                                      | 122 ++----
 submodule.h                                      |   4 +-
 t/t7411-submodule-config.sh                      | 153 +++++++
 test-submodule-config.c                          |  76 ++++
 12 files changed, 839 insertions(+), 98 deletions(-)
 create mode 100644 Documentation/technical/api-submodule-config.txt
 create mode 100644 submodule-config.c
 create mode 100644 submodule-config.h
 create mode 100755 t/t7411-submodule-config.sh
 create mode 100644 test-submodule-config.c

-- 
2.4.2.391.g2979c89

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-06-03 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-02 14:24 [PATCH v4 0/4] submodule config lookup API Heiko Voigt
2015-06-02 14:25 ` [PATCH v4 1/4] implement submodule config cache for lookup of submodule names Heiko Voigt
2015-06-02 19:57   ` Junio C Hamano
2015-06-03 19:31     ` Heiko Voigt
2015-06-02 14:26 ` [PATCH v4 2/4] extract functions for submodule config set and lookup Heiko Voigt
2015-06-02 14:27 ` [PATCH v4 3/4] use new config API for worktree configurations of submodules Heiko Voigt
2015-06-02 14:28 ` [PATCH v4 4/4] do not die on error of parsing fetchrecursesubmodules option Heiko Voigt

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 NNTP newsgroup(s).