threads / discuss / 28335

git rebase fails with: Patch does not have a valid e-mail address.

Subject: git rebase fails with: Patch does not have a valid e-mail address.

## tl;dr

4 messages between Sep 8, 2011 and Sep 9, 2011.

replies: 3people: 3as markdown or json

James Blackburn· Sep 8, 2011, 11:47 UTC · lore
Hi,
I'm trying to rewrite some history and git's telling me:

-bash:jamesb:lc-cam-025:33079> git rebase 7f58969b933745d4cb9bb128bbd3fa8d441cdb92 First, rewinding head to replay your work on top of it... Patch does not have a valid e-mail address.

Now it's true there isn't an email address for the author - the author no longer works for the company, and the email address was removed during the conversion. Therefore the repo contains "Author <>".

Given git doesn't ordinarily complain about this, should this prevent rebase from working?

Cheers, James

Junio C Hamano· Sep 8, 2011, 17:15 UTC · re: James Blackburn · lore

Re: git rebase fails with: Patch does not have a valid e-mail address.

James Blackburn <jamesblackburn@gmail.com> writes:
Show 13 quoted lines
> I'm trying to rewrite some history and git's telling me:
>
> -bash:jamesb:lc-cam-025:33079> git rebase
> 7f58969b933745d4cb9bb128bbd3fa8d441cdb92
> First, rewinding head to replay your work on top of it...
> Patch does not have a valid e-mail address.
>
> Now it's true there isn't an email address for the author - the author
> no longer works for the company, and the email address was removed
> during the conversion.  Therefore the repo contains "Author <>".
>
> Given git doesn't ordinarily complain about this, should this prevent
> rebase from working?

Perhaps you used "filter-branch" for conversion and your "doesn't ordinarily complain about this" refers to it? If so, I have to say that it is filter-branch that needs to be fixed to error out.

Kyle Moffett· Sep 9, 2011, 04:45 UTC · re: James Blackburn · lore

Re: git rebase fails with: Patch does not have a valid e-mail address.

On Thu, Sep 8, 2011 at 07:47, James Blackburn <jamesblackburn@gmail.com> wrote:
Show 10 quoted lines
> I'm trying to rewrite some history and git's telling me:
>
> -bash:jamesb:lc-cam-025:33079> git rebase
> 7f58969b933745d4cb9bb128bbd3fa8d441cdb92
> First, rewinding head to replay your work on top of it...
> Patch does not have a valid e-mail address.
>
> Now it's true there isn't an email address for the author - the author
> no longer works for the company, and the email address was removed
> during the conversion.  Therefore the repo contains "Author <>".
I can't really speak directly on the "rebase" issue, but...

You probably don't want to remove the email address from the repository during a rewrite. When I was converting some old CVS repositories for my company I very intentionally looked up all of our old user emails to be able to convert them reliably (even though most of the addresses at that point did not work). Even for the users where I could not find a functional address I would just pick something reasonable based on the username convention at the time.

In cases where you can't accurately attribute the commit (IE: username
of "root" or "cvs" or something), you probably want to rewrite it using an
internal mailing list address.  For example, if the kernel had been in a
CVS repository with commits by "root", I would probably rewrite those
to be created by:
  Linux Kernel Developers <lkml@vger.kernel.org>

Cheers, Kyle Moffett

Junio C Hamano· Sep 8, 2011, 21:21 UTC · lore

Re: git rebase fails with: Patch does not have a valid e-mail address.

James Blackburn <jamesblackburn@gmail.com> writes:
Show 9 quoted lines
>> Perhaps you used "filter-branch" for conversion and your "doesn't
>> ordinarily complain about this" refers to it? If so, I have to say that it
>> is filter-branch that needs to be fixed to error out.
>
> I use cvs2git for the conversion (which produces a fast-import
> stream).  That tool doesn't enforce an email address, and it's only
> when I try to rebase that I run into this problem...  AFAICS there's
> nothing fundamentally wrong with what I'm trying to do, so forcing me
> to re-write the author seems to be the wrong answer, no?

Sorry, I do not follow. Nobody is forcing you to rewrite the author, but earlier didn't you say _you_ rewrote the author into that invalid empty string yourself, no?

← back to recent threads