[COGITO PATCH] fetch_local -d behaves different from other fetch_*

From: Santi Béjar <sbejar@gmail.com>
Date: 2005-06-01 20:55:28
"fetch_local -d src dst" does not respect the dst directory name 
if both have different names. So

fetch_local -d /path/to/some/src /path/to/dst

copies to /path/to/src.

In fact this way it's never used in the current cogito so it's not
really affected but it's needed in the case where the heads and tags
are in directories.

Signed-off-by: "Santi Béjar" <sbejar@gmail.com>

 cg-pull |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cg-pull b/cg-pull
--- a/cg-pull
+++ b/cg-pull
@@ -223,15 +223,15 @@ fetch_local () {
 		shift
 	fi
 
-	cut_last=
+	dirs=
 	if [ "$1" = "-d" ]; then
-		cut_last=1
+		dirs=1
 		shift
 	fi
 
 	src="$1"
 	dest="$2"
-	[ "$cut_last" ] && dest=${dest%/*}
+	[ "$dirs" ] && src="${src%/}/."
 
 	cp $cp_flags_l "$src" "$dest"
 }

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Jun 01 20:55:56 2005

This archive was generated by hypermail 2.1.8 : 2005-06-01 20:55:57 EST