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

Re: [PATCH v2] am: gather GIT_AUTHOR_* from original commit when rebasing

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jun 16, 2010, 06:30 UTC
Message-ID
<4C186F9D.1060608@viscovery.net>
In-Reply-To
<1276641564-2074-1-git-send-email-jaysoffian@gmail.com>
Am 6/16/2010 0:39, schrieb Jay Soffian:
Show 6 quoted lines
> +	if test -f "$dotest/original-commit"
> +	then
> +		original_commit="$(cat "$dotest/original-commit")"
> +		GIT_AUTHOR_NAME="$(GIT_PAGER='' git log --format=%an -1 "$original_commit")"
> +		GIT_AUTHOR_EMAIL="$(GIT_PAGER='' git log --format=%ae -1 "$original_commit")"
> +		GIT_AUTHOR_DATE="$(GIT_PAGER='' git log --format=%aD -1 "$original_commit")"

I think you can use the function get_author_ident_from_commit() for this. See git-sh-setup.

-- Hannes
Previous: Jay SoffianNext: Jay Soffian
Message 2 of 4 in “am: gather GIT_AUTHOR_* from original commit when rebasing”
  1. am: gather GIT_AUTHOR_* from original commit when rebasingJay Soffian, Jun 15, 2010
  2. Johannes SixtJun 16, 2010
  3. am: use get_author_ident_from_commit instead of mailinfo when rebasingJay Soffian, Jun 16, 2010
  4. Junio C HamanoJun 16, 2010

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.