Re: [PATCH 1/2] git-sh-setup: refactor ident-parsing functions

2012-11-12 Thread Junio C Hamano
Jeff King writes: > On Mon, Nov 12, 2012 at 12:08:37PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > Changing the interface for get_author_ident_from_commit would be a pain, >> > but if we just wanted to help filter-branch, we could do something like >> > this: >> >> Yes, that is

Re: [PATCH 1/2] git-sh-setup: refactor ident-parsing functions

2012-11-12 Thread Jeff King
On Mon, Nov 12, 2012 at 12:08:37PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > Changing the interface for get_author_ident_from_commit would be a pain, > > but if we just wanted to help filter-branch, we could do something like > > this: > > Yes, that is the direction I was alluding

Re: [PATCH 1/2] git-sh-setup: refactor ident-parsing functions

2012-11-12 Thread Junio C Hamano
Jeff King writes: > Changing the interface for get_author_ident_from_commit would be a pain, > but if we just wanted to help filter-branch, we could do something like > this: Yes, that is the direction I was alluding to. Callers of get_author_ident_from_commit can also do the same and avoid reb

Re: [PATCH 1/2] git-sh-setup: refactor ident-parsing functions

2012-11-12 Thread Jeff King
On Mon, Nov 12, 2012 at 09:44:01AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > The only ident-parsing function we currently provide is > > get_author_ident_from_commit. This is not very > > flexible for two reasons: > > > > 1. It takes a commit as an argument, and can't read from >

Re: [PATCH 1/2] git-sh-setup: refactor ident-parsing functions

2012-11-12 Thread Junio C Hamano
Jeff King writes: > The only ident-parsing function we currently provide is > get_author_ident_from_commit. This is not very > flexible for two reasons: > > 1. It takes a commit as an argument, and can't read from > commit headers saved on disk. > > 2. It will only parse authors, not com

[PATCH 1/2] git-sh-setup: refactor ident-parsing functions

2012-10-18 Thread Jeff King
The only ident-parsing function we currently provide is get_author_ident_from_commit. This is not very flexible for two reasons: 1. It takes a commit as an argument, and can't read from commit headers saved on disk. 2. It will only parse authors, not committers. This patch provides a mo