Description: Avoid calling cd with an empty argument
 Fixes incompatibility with bash 5.3.
Author: Colin Watson <cjwatson@debian.org>
Bug-Debian: https://bugs.debian.org/1115226
Last-Update: 2025-09-16

--- git-dpm-0.10.0.orig/git-dpm.sh
+++ git-dpm-0.10.0/git-dpm.sh
@@ -238,7 +238,9 @@ function checkworkingdir() {
 function cdtoplevel() {
 	test -n "$gitdir" || return 1
 	checkworkingdir || return 1
-	cd -- "$reldir" || return 1
+	if [ "$reldir" ]; then
+		cd -- "$reldir" || return 1
+	fi
 	reldir=""
 }
 
