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

[RFC/PATCH] Documentation: Don't assume git-sh-setup and git-parse-remote are in the PATH

From
Jonathan Nieder <jrnieder@uchicago.edu>
Date
Jun 27, 2008, 20:10 UTC
Message-ID
<20080627151001.BIA19424@m4500-01.uchicago.edu>

Starting with Git 1.5.4, use of dashed forms of git commands in scripts without "PATH=$(git --exec-path):$PATH" was deprecated. Thus we generally advertise the non-dashed forms of commands. git-sh-setup and git-parse-remote do not have non-dashed forms because they are meant to be sourced from a script using .; thus the only recommended way to use them is by updating PATH first. This patch changes the documentation accordingly.

This does not matter as much for releases before 1.6.0, because by default the GIT_EXEC_PATH is in the PATH already.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
---
 I wrote:
 > I wanted to just change the ". git-sh-setup" line to ". git sh-setup",
 > but of course that will not work. Am I missing something?
 Yes, I am.
 I do not have asciidoc installed, so this patch is completely untested.
 Documentation/git-parse-remote.txt |    2 ++
 Documentation/git-sh-setup.txt     |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-parse-remote.txt b/Documentation/git-parse-remote.txt
index 951dbd6..56d0505 100644
--- a/Documentation/git-parse-remote.txt
+++ b/Documentation/git-parse-remote.txt
@@ -8,6 +8,8 @@ git-parse-remote - Routines to help parsing remote repository access
 
 SYNOPSIS
 --------
+[verse]
+'PATH=$(git --exec-path):$PATH'
 '. git-parse-remote'
 
 DESCRIPTION
diff --git a/Documentation/git-sh-setup.txt b/Documentation/git-sh-setup.txt
index c543170..95b0c13 100644
--- a/Documentation/git-sh-setup.txt
+++ b/Documentation/git-sh-setup.txt
@@ -7,7 +7,8 @@ git-sh-setup - Common git shell script setup code
 
 SYNOPSIS
 --------
-'git-sh-setup'
+'PATH=$(git --exec-path):$PATH'
+'. git-sh-setup'
 
 DESCRIPTION
 -----------
-- 
1.5.5.GIT
Next: Alex Riesen
Message 1 of 7 in “Documentation: Don't assume git-sh-setup and git-parse-remote are in the PATH”
  1. Documentation: Don't assume git-sh-setup and git-parse-remote are in the PATHJonathan Nieder, Jun 27, 2008
  2. Alex RiesenJun 28, 2008
  3. Junio C HamanoJun 28, 2008
  4. Jeff KingJun 29, 2008
  5. jrnieder@uchicago.eduJun 29, 2008
  6. Junio C HamanoJun 29, 2008
  7. Jonathan NiederJun 30, 2008

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.