threads / patch / 1953

patchwrap scp in cogito

Subject: [PATCH] wrap scp in cogito

## tl;dr

One message between Sep 26, 2005 and Sep 26, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Dan Aloni· Sep 26, 2005, 21:15 UTC · lore
Hello,

Since git allows to wrap ssh by the means of the GIT_SSH environment variable I think it would be appropriate to complete the picture and wrap the usage of scp in cogito by using the same measures. The patch follows.

Show changes to 2 files +7 −1

cg-Xlib, cg-fetch

diff --git a/cg-Xlib b/cg-Xlib
--- a/cg-Xlib
+++ b/cg-Xlib
@@ -471,6 +471,12 @@ if [ "$_git_requires_root" ] && [ "$_git
 	exit 1
 fi
 
+if [ "$GIT_SCP" != "" ] ; then
+    _cogito_scp=$GIT_SCP
+else
+    _cogito_scp=scp	
+fi
+
 
 # Backward compatibility hacks:
 # Fortunately none as of now.
diff --git a/cg-fetch b/cg-fetch
--- a/cg-fetch
+++ b/cg-fetch
@@ -206,7 +206,7 @@ get_ssh()
 		echo "Warning: Cannot protect against overwriting $dest when fetching over ssh" 2>/dev/null
 
 	[ "$directory" ] && dest=$(dirname "$dest")
-	scp $scp_flags "$src" "$dest"
+	${_cogito_scp} $scp_flags "$src" "$dest"
 }
 
 fetch_ssh()
-- 
Dan Aloni
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net

← back to recent threads