path: root/Documentation
diff options
authorJunio C Hamano <>2005-05-10 00:57:56 (GMT)
committerJunio C Hamano <>2005-05-10 00:57:56 (GMT)
commitd19938ab6053e3dad75a68a60ef8cad1f378b0e5 (patch)
treea82858b907bc445193e07777d0d65eac0e30742c /Documentation
parentb3f94c4b554cd6c3db3e99dc33bdac7d8155d606 (diff)
Rename environment variables.
H. Peter Anvin mentioned that using SHA1_whatever as an environment variable name is not nice and we should instead use names starting with "GIT_" prefix to avoid conflicts. Here is what this patch does: * Renames the following environment variables: New name Old Name GIT_AUTHOR_DATE AUTHOR_DATE GIT_AUTHOR_EMAIL AUTHOR_EMAIL GIT_AUTHOR_NAME AUTHOR_NAME GIT_COMMITTER_EMAIL COMMIT_AUTHOR_EMAIL GIT_COMMITTER_NAME COMMIT_AUTHOR_NAME GIT_ALTERNATE_OBJECT_DIRECTORIES SHA1_FILE_DIRECTORIES GIT_OBJECT_DIRECTORY SHA1_FILE_DIRECTORY * Introduces a compatibility macro, gitenv(), which does an getenv() and if it fails calls gitenv_bc(), which in turn picks up the value from old name while giving a warning about using an old name. * Changes all users of the environment variable to fetch environment variable with the new name using gitenv(). * Updates the documentation and scripts shipped with Linus GIT distribution. The transition plan is as follows: * We will keep the backward compatibility list used by gitenv() for now, so the current scripts and user environments continue to work as before. The users will get warnings when they have old name but not new name in their environment to the stderr. * The Porcelain layers should start using new names. However, just in case it ends up calling old Plumbing layer implementation, they should also export old names, taking values from the corresponding new names, during the transition period. * After a transition period, we would drop the compatibility support and drop gitenv(). Revert the callers to directly call getenv() but keep using the new names. The last part is probably optional and the transition duration needs to be set to a reasonable value. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation')
1 files changed, 14 insertions, 13 deletions
diff --git a/Documentation/core-git.txt b/Documentation/core-git.txt
index 09a70f2..4c80c7e 100644
--- a/Documentation/core-git.txt
+++ b/Documentation/core-git.txt
@@ -210,15 +210,16 @@ Environment Variables
Various git commands use the following environment variables:
@@ -439,11 +440,11 @@ If not provided, "git-commit-tree" uses your name, hostname and domain to
provide author and committer info. This can be overridden using the
following environment variables.
(nb <,> and '\n's are stripped)
@@ -876,7 +877,7 @@ sha1 mismatch <object>::
Environment Variables
used to specify the object database root (usually .git/objects)
@@ -918,7 +919,7 @@ DESCRIPTION
This simply creates an empty git object database - basically a `.git`
directory and `.git/object/??/` directories.
-If the object storage directory is specified via the 'SHA1_FILE_DIRECTORY'
+If the object storage directory is specified via the 'GIT_OBJECT_DIRECTORY'
environment variable then the sha1 directories are created underneath -
otherwise the default `.git/objects` directory is used.