git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* error in rewriting author history with filter-branch --env-filter
@ 2009-04-05  4:21 Adam Mercer
  2009-04-05  7:21 ` Mike Hommey
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Mercer @ 2009-04-05  4:21 UTC (permalink / raw)
  To: GIT

Hi

I'm trying to use git filter-branch to rewrite the author information
on an repo that was imported from CVS a while ago, the commits I'm
trying to rewrite are as follows:

commit 2cdeb25148f02b35391bd80a2c4c1876d7b8b840
Author: <ram>
Date:   Wed Dec 22 13:36:01 2004 +0000

    modify style

I'm trying to modify <ram> to be replaced with my name and email
address. To do this I've been trying to use the following command

$ git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
if [ "$GIT_AUTHOR_EMAIL" = "ram"]; then
an="Adam Mercer"
am="ramercer@gmail.com"
fi
export GIT_AUTHOR_NAME=$an
export GIT_AUTHOR_EMAIL=$am
'

however when I run this I get loads of errors of the form:

Rewrite 18242fa722ff393e7fce78e05f37fa7c3b3825e1
(1/216)/opt/local/libexec/git-core/git-filter-branch: line 307: [:
missing `]'

Any ideas what I'm doing wrong? I'm running git-1.6.2.2.

Cheers

Adam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error in rewriting author history with filter-branch --env-filter
  2009-04-05  4:21 error in rewriting author history with filter-branch --env-filter Adam Mercer
@ 2009-04-05  7:21 ` Mike Hommey
  2009-04-05 15:52   ` Adam Mercer
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Hommey @ 2009-04-05  7:21 UTC (permalink / raw)
  To: Adam Mercer; +Cc: GIT

On Sat, Apr 04, 2009 at 11:21:36PM -0500, Adam Mercer wrote:
> Hi
> 
> I'm trying to use git filter-branch to rewrite the author information
> on an repo that was imported from CVS a while ago, the commits I'm
> trying to rewrite are as follows:
> 
> commit 2cdeb25148f02b35391bd80a2c4c1876d7b8b840 Author: <ram> Date:
> Wed Dec 22 13:36:01 2004 +0000
> 
>     modify style
> 
> I'm trying to modify <ram> to be replaced with my name and email
> address. To do this I've been trying to use the following command
> 
> $ git filter-branch --env-filter ' an="$GIT_AUTHOR_NAME"
> am="$GIT_AUTHOR_EMAIL" if [ "$GIT_AUTHOR_EMAIL" = "ram"]; then
> an="Adam Mercer" am="ramercer@gmail.com" fi export GIT_AUTHOR_NAME=$an
> export GIT_AUTHOR_EMAIL=$am '
> 
> however when I run this I get loads of errors of the form:
> 
> Rewrite 18242fa722ff393e7fce78e05f37fa7c3b3825e1
> (1/216)/opt/local/libexec/git-core/git-filter-branch: line 307: [:
> missing `]'
> 
> Any ideas what I'm doing wrong? I'm running git-1.6.2.2.

You need a white space between "ram" and ].

Mike

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: error in rewriting author history with filter-branch --env-filter
  2009-04-05  7:21 ` Mike Hommey
@ 2009-04-05 15:52   ` Adam Mercer
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Mercer @ 2009-04-05 15:52 UTC (permalink / raw)
  To: Mike Hommey; +Cc: GIT

On Sun, Apr 5, 2009 at 02:21, Mike Hommey <mh@glandium.org> wrote:

> You need a white space between "ram" and ].

Thanks! I knew it would be something stupid!

Cheers

Adam

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-05 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-05  4:21 error in rewriting author history with filter-branch --env-filter Adam Mercer
2009-04-05  7:21 ` Mike Hommey
2009-04-05 15:52   ` Adam Mercer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).