git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] wrap scp in cogito

From
DADan Aloni <da-x@monatomic.org>
Date
Sep 26, 2005, 21:15 UTC
Message-ID
<20050926211502.GA27488@localdomain>
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
Message 1 of 1 in “wrap scp in cogito”
  1. wrap scp in cogitoDan Aloni, Sep 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.