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

Re: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Oct 17, 2012, 07:23 UTC
Message-ID
<507E5CE0.10002@viscovery.net>
In-Reply-To
<1109432467.20121017104729@gmail.com>
Am 10/17/2012 8:47, schrieb Ilya Basin:
Show 14 quoted lines
> The filter-branch command, the contents of ~/.gitconfig and the tree
> are the same.
> The command succeeds on cygwin, but fails on Solaris due to
> unset GIT_AUTHOR_NAME and GIT_COMMITTER_NAME :
> 
> $ git filter-branch --tree-filter "env | grep GIT_ ; $CMD" b416b9bfc5e71531f2f05af4c396bb0ba7560741..HEAD
> Rewrite 214efc6eec82b015aefe23b2280979f05b351396 (1/16)GIT_DIR=/home/tester/.ilya/builds/makepkg.rap_0.1-1_sparc.XXXXXX/src/rap/.git
> GIT_INDEX_FILE=/home/tester/.ilya/builds/makepkg.rap_0.1-1_sparc.XXXXXX/src/rap/.git-rewrite/t/../index
> GIT_WORK_TREE=.
> GIT_AUTHOR_NAME=
> GIT_COMMITTER_NAME=
> GIT_COMMIT=214efc6eec82b015aefe23b2280979f05b351396
> fatal: empty ident  <my@email.com> not allowed
> could not write rewritten commit

Most likely, your sed has problems with a sed script in function get_author_ident_from_commit. I tested it like this:

$ sh -c '. $(git --exec-path)/git-sh-setup;
		get_author_ident_from_commit HEAD'
GIT_AUTHOR_NAME='Johannes Sixt'
GIT_AUTHOR_EMAIL='j6t@kdbg.org'
GIT_AUTHOR_DATE='@1350025129 +0200'
-- Hannes
Previous: Jeff KingNext: Ilya Basin
Message 3 of 24 in “What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?”
  1. Ilya BasinOct 17, 2012
  2. Jeff KingOct 17, 2012
  3. Johannes SixtOct 17, 2012
  4. Re[2]: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?Ilya Basin, Oct 17, 2012
  5. Re[3]: What can cause empty GIT_AUTHOR_NAME for 'git filter-branch --tree-filter' on Solaris?Ilya Basin, Oct 17, 2012
  6. Jeff KingOct 17, 2012
  7. Jeff KingOct 17, 2012
  8. Johannes SixtOct 18, 2012
  9. Jeff KingOct 18, 2012
  10. Junio C HamanoOct 18, 2012
  11. Jeff KingOct 18, 2012
  12. 0/2 clean up filter-branch ident parsingJeff King, Oct 18, 2012
  13. 1/2 git-sh-setup: refactor ident-parsing functionsJeff King, Oct 18, 2012
  14. Junio C HamanoNov 12, 2012
  15. Jeff KingNov 12, 2012
  16. Junio C HamanoNov 12, 2012
  17. Jeff KingNov 12, 2012
  18. Junio C HamanoNov 12, 2012
  19. 2/2 filter-branch: use git-sh-setup's ident parsing functionsJeff King, Oct 18, 2012
  20. Johannes SixtOct 18, 2012
  21. Jeff KingOct 18, 2012
  22. Jeff KingOct 18, 2012
  23. Jeff KingOct 18, 2012
  24. 2/2 filter-branch: use git-sh-setup's ident parsing functionsJeff King, Oct 18, 2012

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.