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

Re: [RFC] Renaming environment variables.

From
Petr Baudis <pasky@ucw.cz>
Date
May 10, 2005, 00:25 UTC
Message-ID
<20050510002548.GI15712@pasky.ji.cz>
In-Reply-To
<7vhdhcxj0z.fsf_-_@assigned-by-dhcp.cox.net>

Dear diary, on Mon, May 09, 2005 at 10:05:00PM CEST, I got a letter where Junio C Hamano <junkio@cox.net> told me that...

Show 11 quoted lines
>  - 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_COMMIT_AUTHOR_EMAIL COMMIT_AUTHOR_EMAIL
>     GIT_COMMIT_AUTHOR_NAME  COMMIT_AUTHOR_NAME
>     GIT_ALTERNATE_OBJECTS   SHA1_FILE_DIRECTORIES
>     GIT_OBJECTS             SHA1_FILE_DIRECTORY

Could I please have s/COMMIT_AUTHOR/COMMITTER/ and s/OBJECTS/(OBJDIR|OBJECT_DIR)/?

Show 13 quoted lines
> 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.

(Cogito needs its own git-merge-cache so that the merge goes properly anyway, and it already (or still) carries its Git around, so I think it's not applicable to it. Yes, I want and plan to start publishing the Git changes, I'm already making some steps for that and I hope I have something to show by tomorrow.)

Show 6 quoted lines
>  - After a couple of weeks or so, 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.

Yes, I think couple of weeks is too long. :-) I'd say one or two releases is enough.

> --- /dev/null
> +++ b/gitenv.c
Pretty please, add copyright notices at the top of files.
Show 7 quoted lines
> +char *gitenv_bc(const char *e)
> +{
> +	int first, last;
> +	char *val = getenv(e);
> +	if (val)
> +		/* inefficient.  caller should use gitenv() not gitenv_bc() */
> +		return val;

Can this ever happen? If doing it at all, I'd expect gitenv_bc() to rather freak out and die(), the caller is broken.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Daniel BarkalowNext: Junio C Hamano
Message 29 of 30 in “Introduce SHA1_FILE_DIRECTORIES”
  1. Introduce SHA1_FILE_DIRECTORIESJunio C Hamano, May 6, 2005
  2. SeanMay 7, 2005
  3. Junio C HamanoMay 7, 2005
  4. SeanMay 7, 2005
  5. Junio C HamanoMay 7, 2005
  6. Junio C HamanoMay 7, 2005
  7. H. Peter AnvinMay 9, 2005
  8. Junio C HamanoMay 9, 2005
  9. SeanMay 9, 2005
  10. H. Peter AnvinMay 9, 2005
  11. Junio C HamanoMay 9, 2005
  12. [RFC] Renaming environment variables.Junio C Hamano, May 9, 2005
  13. Thomas GlanzmannMay 9, 2005
  14. Petr BaudisMay 10, 2005
  15. SeanMay 9, 2005
  16. Daniel BarkalowMay 9, 2005
  17. Junio C HamanoMay 10, 2005
  18. Petr BaudisMay 10, 2005
  19. Junio C HamanoMay 10, 2005
  20. Petr BaudisMay 10, 2005
  21. Daniel BarkalowMay 10, 2005
  22. Petr BaudisMay 10, 2005
  23. Daniel BarkalowMay 10, 2005
  24. Junio C HamanoMay 10, 2005
  25. Introducing GIT_DIR environment variable.Junio C Hamano, May 10, 2005
  26. Alex RiesenMay 10, 2005
  27. Junio C HamanoMay 10, 2005
  28. Daniel BarkalowMay 10, 2005
  29. Petr BaudisMay 10, 2005
  30. Junio C HamanoMay 10, 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.