Thread (10 messages) 10 messages, 4 authors, 2016-06-15

[PATCH] git-submodule: remove unnecessary exits when calling resolve_relative_url

DORMANTno replies

From: David Aguilar <hidden>
Date: 2016-06-15 22:45:24
Subsystem: the rest · Maintainer: Linus Torvalds

resolve_relative_url calls die() when no remote url exists so these calls to
exit can be removed.

Signed-off-by: David Aguilar <redacted>
---

This applies on top of the first
"Fix submodule sync with relative submodule URLs" patch by Johan Herland.
Shawn's comments made me realize that the resolve_relative_url callers
could be cleaned up.

 git-submodule.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/git-submodule.sh b/git-submodule.sh
index 92be0fe..533d1cc 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -155,7 +155,7 @@ cmd_add()
 	case "$repo" in
 	./*|../*)
 		# dereference source url relative to parent's url
-		realrepo=$(resolve_relative_url "$repo") || exit
+		realrepo=$(resolve_relative_url "$repo")
 		;;
 	*:*|/*)
 		# absolute url
@@ -184,7 +184,7 @@ cmd_add()
 
 		case "$repo" in
 		./*|../*)
-			url=$(resolve_relative_url "$repo") || exit
+			url=$(resolve_relative_url "$repo")
 		    ;;
 		*)
 			url="$repo"
@@ -270,7 +270,7 @@ cmd_init()
 		# Possibly a url relative to parent
 		case "$url" in
 		./*|../*)
-			url=$(resolve_relative_url "$url") || exit
+			url=$(resolve_relative_url "$url")
 			;;
 		esac
 
@@ -638,7 +638,7 @@ cmd_sync()
 		# Possibly a url relative to parent
 		case "$url" in
 		./*|../*)
-			url=$(resolve_relative_url "$url") || exit
+			url=$(resolve_relative_url "$url")
 			;;
 		esac
 
-- 
1.6.0.2.307.gc4275
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help