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

Re: git-commit: allow From: line to be entered in commit message

From
Junio C Hamano <junkio@cox.net>
Date
Jan 13, 2006, 17:40 UTC
Message-ID
<7v64oo9gc7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<40b2b7d90601130311v78db741dx7c5eaa57ad300850@mail.gmail.com>
Artem Khodush <greenkaa@gmail.com> writes:
Show 10 quoted lines
>> $ export GIT_AUTHOR_NAME="$author"
>> $ GIT_AUTHOR_EMAIL="$email" git commit -F .msgfile
>
>> Which is cumbersome and also ends up destroying your defaults if you happen
>> to use that method, so afterward you have to unset them or reset them back
>> to your own author info.
>
> I had a similar problem on cygwin. I agree that setting environment
> variables by hand
> is cumbersome, and modifying global environment is undesirable...

Have you two known that more than one environment variables can be set for one-shot command execution?

	$ GIT_AUTHOR_NAME="$author" \
	  GIT_AUTHOR_EMAIL="$email" git commit -F .msgfile

would give these environment variables for this "git commit" without affecting the later commands.

Not that this really matters, since the above example was an excerpt of my suggestion about how to do this in a script, somehow made to look as if it was a suggestion about running things by hand from the command line...

Previous: Artem KhodushNext: sean
Message 13 of 16 in “git-commit: allow From: line to be entered in commit message”
  1. seanJan 12, 2006
  2. seanJan 12, 2006
  3. Junio C HamanoJan 12, 2006
  4. Andreas EricssonJan 12, 2006
  5. Junio C HamanoJan 12, 2006
  6. seanJan 13, 2006
  7. seanJan 13, 2006
  8. Junio C HamanoJan 13, 2006
  9. seanJan 13, 2006
  10. Junio C HamanoJan 13, 2006
  11. seanJan 13, 2006
  12. Artem KhodushJan 13, 2006
  13. Junio C HamanoJan 13, 2006
  14. seanJan 13, 2006
  15. Junio C HamanoJan 13, 2006
  16. Johannes SchindelinJan 13, 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.