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

[PATCH] cogito: export user env in tutorial-script

From
Gerrit Pape <pape@smarden.org>
Date
Jun 29, 2006, 08:58 UTC
Message-ID
<20060629085823.1400.qmail@2a570ab8441287.315fe32.mid.smarden.org>

The GIT_* environment variables set in switch_user() must be exported to be available to the programs run afterwards.

Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 Documentation/tutorial-script/script.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
f4d96a4ceda9b7ac7e2e29f4b017edf60360904c
diff --git a/Documentation/tutorial-script/script.sh b/Documentation/tutorial-script/script.sh
index b99e3c9..b0e49c8 100755
--- a/Documentation/tutorial-script/script.sh
+++ b/Documentation/tutorial-script/script.sh
@@ -52,10 +52,10 @@ switch_user () {
 		*) echo "I don't know you, $1"; exit 1;;
 	esac
 	HOME=$(pwd)
-	GIT_AUTHOR_NAME="$1"
-	GIT_AUTHOR_EMAIL="$1@example.com"
-	GIT_COMMITTER_NAME="$1"
-	GIT_COMMITTER_EMAIL="$1@example.com"
+	export GIT_AUTHOR_NAME="$1"
+	export GIT_AUTHOR_EMAIL="$1@example.com"
+	export GIT_COMMITTER_NAME="$1"
+	export GIT_COMMITTER_EMAIL="$1@example.com"
 }
 
 
-- 
1.3.3
Message 1 of 1 in “cogito: export user env in tutorial-script”
  1. cogito: export user env in tutorial-scriptGerrit Pape, Jun 29, 2006

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.