Commit Diff


commit - 48c84e600154b1e55f4105c49e38acb29abc9d80
commit + 49aa539ae942aff06b21e3252bed3977e80398e3
blob - 0930f71c8146155d8882f672a15be677ed8eadc5
blob + 588e227a26ee5dff0066f6f1dd4dbf7581b3f5ec
--- include/got_path.h
+++ include/got_path.h
@@ -28,12 +28,6 @@ int got_path_is_absolute(const char *);
  */
 char *got_path_get_absolute(const char *);
 
-/* 
- * Normalize a path for internal processing.
- * The result is allocated with malloc(3).
- */
-char *got_path_normalize(const char *);
-
 /*
  * Canonicalize absolute paths by removing redundant path separators
  * and resolving references to parent directories ("/../").
blob - fb283d460760a9d031f838d8fb9053fc63930ebd
blob + 8d2ef334e7a05632a8884779d1d12b8dbf60bdc0
--- lib/path.c
+++ lib/path.c
@@ -56,24 +56,6 @@ got_path_get_absolute(const char *relpath) 
 		return NULL;
 
 	return abspath;
-}
-
-char *
-got_path_normalize(const char *path)
-{
-	char *resolved;
-
-	resolved = realpath(path, NULL);
-	if (resolved == NULL)
-		return NULL;
-	
-	if (!got_path_is_absolute(resolved)) {
-		char *abspath = got_path_get_absolute(resolved);
-		free(resolved);
-		resolved = abspath;
-	}
-
-	return resolved;
 }
 
 /* based on canonpath() from kern_pledge.c */