# git-filter-branch may leave tree in a nasty state

3 messages from 2008-03-02 to 2008-03-02. Participants: Jan Engelhardt, Johannes Schindelin.
Thread: https://gitlist.dev/t/12434

## Jan Engelhardt, 2008-03-02 19:31

Subject: git-filter-branch may leave tree in a nasty state
Message-ID: <Pine.LNX.4.64.0803022029540.27717@fbirervta.pbzchgretzou.qr>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0803022029540.27717%40fbirervta.pbzchgretzou.qr

```
Hi,



$ git-filter-branch --env-filter 'export GIT_AUTHOR_NAME="";' b4caa441..HEAD
Rewrite cf1d02ac074041f7e570ff206d87fb47ef2b2c34 (1/1)fatal: empty ident  
<user@corp.com> not allowed

Ref 'refs/heads/master' was deleted
fatal: Not a valid object name HEAD

$ git log
fatal: bad default revision 'HEAD'

```

## Johannes Schindelin, 2008-03-02 20:40

Subject: Re: git-filter-branch may leave tree in a nasty state
Message-ID: <alpine.LSU.1.00.0803022039360.22527@racer.site>
URL: https://gitlist.dev/e/alpine.LSU.1.00.0803022039360.22527%40racer.site
In-Reply-To: <Pine.LNX.4.64.0803022029540.27717@fbirervta.pbzchgretzou.qr>

```
Hi,

On Sun, 2 Mar 2008, Jan Engelhardt wrote:

> $ git-filter-branch --env-filter 'export GIT_AUTHOR_NAME="";' b4caa441..HEAD
> Rewrite cf1d02ac074041f7e570ff206d87fb47ef2b2c34 (1/1)fatal: empty ident  
> <user@corp.com> not allowed

Well, I kinda expected people savvy enough to run filter-branch to have 
set up the proper ident ;-)

Ciao,
Dscho

```

## Jan Engelhardt, 2008-03-02 21:02

Subject: Re: git-filter-branch may leave tree in a nasty state
Message-ID: <Pine.LNX.4.64.0803022159130.27717@fbirervta.pbzchgretzou.qr>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0803022159130.27717%40fbirervta.pbzchgretzou.qr
In-Reply-To: <alpine.LSU.1.00.0803022039360.22527@racer.site>

```

On Mar 2 2008 20:40, Johannes Schindelin wrote:
>On Sun, 2 Mar 2008, Jan Engelhardt wrote:
>
>> $ git-filter-branch --env-filter 'export GIT_AUTHOR_NAME="";' b4caa441..HEAD
>> Rewrite cf1d02ac074041f7e570ff206d87fb47ef2b2c34 (1/1)fatal: empty ident  
>> <user@corp.com> not allowed
>
>Well, I kinda expected people savvy enough to run filter-branch to have 
>set up the proper ident ;-)

Nah, this is just the test case. The real scripts I use write
author, email and log message to a file in the env-filter hook,
call an editor where they can be arbitrarily changed, and then
the rest of the env-filter and msg-filter hooks parse the text
file back into the shell variables.

So I am changing the ident of existing commits (postprocessing
a non-git tree conversion).

The problem is that some editors clear the terminal window
(in other words, they are "full-screen"), so I did not get to
see the filter-branch error message at all because the next
editor invocation just popped in.

Most importantly, git-filter-branch should STOP when it detects
a problem, not try rewriting the next commit.

```
