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

4 messages from 2011-09-08 to 2011-09-09. Participants: James Blackburn, Junio C Hamano, Kyle Moffett.
Thread: https://gitlist.dev/t/28335

## James Blackburn, 2011-09-08 11:47

Subject: git rebase fails with: Patch does not have a valid e-mail address.
Message-ID: <CACyv8dckmRxgb9_FDTW+=1Y9bS27b3XZQCHnhjpfHiJig5p6wg@mail.gmail.com>
URL: https://gitlist.dev/e/CACyv8dckmRxgb9_FDTW%2B%3D1Y9bS27b3XZQCHnhjpfHiJig5p6wg%40mail.gmail.com

```
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, 2011-09-08 17:15

Subject: Re: git rebase fails with: Patch does not have a valid e-mail address.
Message-ID: <7v7h5jx8dz.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v7h5jx8dz.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CACyv8dckmRxgb9_FDTW+=1Y9bS27b3XZQCHnhjpfHiJig5p6wg@mail.gmail.com>

```
James Blackburn <jamesblackburn@gmail.com> writes:

> 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.

```

## Junio C Hamano, 2011-09-08 21:21

Subject: Re: git rebase fails with: Patch does not have a valid e-mail address.
Message-ID: <7vipp2wx13.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vipp2wx13.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CACyv8dc28sRWsObYi3vbFNakj=R-2Q9eAoJdFfqNxsqq2+_aPg@mail.gmail.com>

```
James Blackburn <jamesblackburn@gmail.com> writes:

>> 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?

```

## Kyle Moffett, 2011-09-09 04:45

Subject: Re: git rebase fails with: Patch does not have a valid e-mail address.
Message-ID: <CAGZ=bqJc-Yqp_hDNsfpqq-DPafrh0sDKbSfgTGgR9GGHEwiuug@mail.gmail.com>
URL: https://gitlist.dev/e/CAGZ%3DbqJc-Yqp_hDNsfpqq-DPafrh0sDKbSfgTGgR9GGHEwiuug%40mail.gmail.com
In-Reply-To: <CACyv8dckmRxgb9_FDTW+=1Y9bS27b3XZQCHnhjpfHiJig5p6wg@mail.gmail.com>

```
On Thu, Sep 8, 2011 at 07:47, James Blackburn <jamesblackburn@gmail.com> wrote:
> 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

```
