2011-07-31 3 views
0

mon repo git semble être corrompu.Comment réparer git log après utilisation hg-fast-export.sh?

$ git push -u origin master 
Counting objects: 16157, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (5794/5794), done. 
error: object 7e2ee8b2364db1cab7a340a1d5d26cd40aa0deff:invalid author/committer line - bad date 
fatal: Error in object 
error: pack-objects died of signal 13 

$ git cat-file -p 7e2ee8b2364db1cab7a340a1d5d26cd40aa0deff 
tree 00258bdecaf83c001ae1be7dbedbd0eeee25c373 
parent 7d15e8d2ea1ff5ef98a0996ed14b8b236f1461ec 
author Jacob Carlborg <[email protected]> <[email protected]> <Jacob Carlborg <[email protected]> <[email protected]>> 1219589646 +0200 
committer Jacob Carlborg <[email protected]> <[email protected]> <Jacob Carlborg <[email protected]> <[email protected]>> 1219589646 +0200 

Add __APPLE__ to most #if linux compile time switches. 

Alors email semblent se tromper, comment je peux le réparer par Jacob Carlborg?

Répondre

1

semblent être fixé avec

#!/usr/bin/env bash 
git filter-branch --env-filter ' 
get_name() { 
    grep "^$1=" "$authors_file" | 
    sed "s/^.*=\(.*\) <.*>$/\1/" 
} 

get_email() { 
    grep "^$1=" "$authors_file" | 
    sed "s/^.*=.* <\(.*\)>$/\1/" 
} 

an="$GIT_AUTHOR_NAME" 
am="$GIT_AUTHOR_EMAIL" 
cn="$GIT_COMMITTER_NAME" 
cm="$GIT_COMMITTER_EMAIL" 

if [ $GIT_COMMIT = "7e2ee8b2364db1cab7a340a1d5d26cd40aa0deff" ] 
then 
    cn="Jacob Carlborg" 
    cm="<[email protected]>" 
    an="Jacob Carlborg" 
    am="<[email protected]>" 
else 
    cn="$GIT_AUTHOR_NAME" 
    cm="$GIT_AUTHOR_EMAIL" 
    an="$GIT_AUTHOR_NAME" 
    am="get_email $GIT_COMMITTER_NAME" 
fi 

export GIT_AUTHOR_NAME="$an" 
export GIT_AUTHOR_EMAIL="$am" 
export GIT_COMMITTER_NAME="$cn" 
export GIT_COMMITTER_EMAIL="$cm" 

'

bloc autre pourrait être retiré