[PATCH v4 0/4] submodule config lookup API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]