Git development
 help / color / mirror / Atom feed
* [PATCH] wrap scp in cogito
@ 2005-09-26 21:15 Dan Aloni
  0 siblings, 0 replies; only message in thread
From: Dan Aloni @ 2005-09-26 21:15 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

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.


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-26 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-26 21:15 [PATCH] wrap scp in cogito Dan Aloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox