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

[PATCH 3/3] doc/remote-helpers: document the gitdir feature

From
Dmitry Ivankov <divanorama@gmail.com>
Date
Jul 12, 2011, 15:10 UTC
Message-ID
<1310483428-29833-4-git-send-email-divanorama@gmail.com>
In-Reply-To
<1310483428-29833-1-git-send-email-divanorama@gmail.com>

The gitdir capability is recognized by git and can be used to tell the helper where the .git directory is. But it is not mentioned in the documentation.

Document the gitdir feature. Upon reading this capability transport-helper sends out "gitdir path_to_dot_git" command to the helper. Which looks exactly like sending a command. So let's call this a command.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
---
 Documentation/git-remote-helpers.txt |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-remote-helpers.txt b/Documentation/git-remote-helpers.txt
index 58f6ad4..a16a5e5 100644
--- a/Documentation/git-remote-helpers.txt
+++ b/Documentation/git-remote-helpers.txt
@@ -159,6 +159,14 @@ Supported if the helper has the "import" capability.
 +
 Supported if the helper has the "connect" capability.
 
+'gitdir' <path>::
+	Tells helper the location of current repository .git
+	directory. The path is absolute. The command is issued
+	immediately after "gitdir" capability line is read by
+	the caller.
++
+Supported if the helper has the "gitdir" capability.
+
 If a fatal error occurs, the program writes the error message to
 stderr and exits. The caller should expect that a suitable error
 message has been printed if the child closes the connection without
@@ -175,6 +183,7 @@ CAPABILITIES
 'push'::
 'import'::
 'connect'::
+'gitdir'::
 	This helper supports the corresponding command with the same name.
 
 'refspec' 'spec'::
@@ -187,6 +196,12 @@ CAPABILITIES
 	all, it must cover all refs reported by the list command; if
 	it is not used, it is effectively "{asterisk}:{asterisk}"
 
+'gitdir'::
+	The helper wants to know .git directory location. The gitdir
+	command is sent immediately after reading this capability.
+	The helper can read it immediately too or it can proceed with
+	reporting other capabilities and read it as a next command.
+
 REF LIST ATTRIBUTES
 -------------------
 
-- 
1.7.3.4
Previous: Ramkumar RamachandraNext: Sverre Rabbelier
Message 6 of 14 in “doc/{fast-import,remote-helpers}: few clarifications”
  1. 0/3 doc/{fast-import,remote-helpers}: few clarificationsDmitry Ivankov, Jul 12, 2011
  2. 1/3 doc/fast-import: clarify notemodify commandDmitry Ivankov, Jul 12, 2011
  3. 2/3 doc/fast-import: document feature import-marks-if-existsDmitry Ivankov, Jul 12, 2011
  4. Junio C HamanoJul 12, 2011
  5. Ramkumar RamachandraJul 13, 2011
  6. 3/3 doc/remote-helpers: document the gitdir featureDmitry Ivankov, Jul 12, 2011
  7. Sverre RabbelierJul 13, 2011
  8. 1/3 doc/fast-import: clarify notemodify commandDmitry Ivankov, Jul 13, 2011
  9. Johan HerlandJul 22, 2011
  10. 2/3 doc/fast-import: document feature import-marks-if-existsDmitry Ivankov, Jul 13, 2011
  11. 3/3 remote-helpers: export GIT_DIR variable to helpersDmitry Ivankov, Jul 13, 2011
  12. Dmitry IvankovJul 13, 2011
  13. Sverre RabbelierJul 13, 2011
  14. Dmitry IvankovJul 13, 2011

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.